magento 2 export not working , after clicking continue its redirect to the dashboard - magento2

Product CSV created in var folder but it's not getting the download. Or CSV file shows 302 error.
I tried all the solutions given for not working export. is there any other way?
1.expected result: It should download a CSV file
2.actual result: It only generates a file in the var folder but not getting a download.

You have to remove deprecated "modules_disable_output" values from core_config_data,
Before run below query please take backup of core_config_data table.
DELETE FROM core_config_data WHERE path LIKE
"advanced/modules_disable_output/%";
And clear cache
Hope it will work for you.

Related

KDB generating ERROR:file/path/location/sym os reports: No such file or directory

I am trying to save table as partition using .Q.dpt[hdbroot;.z.d;`tablename].
But it's generating No such file or directory error, but the directory is present.
can you please help me on this.
I have created blank folder to store the data but it's checking for sym file while storing data.
I have created one blank folder and gave that folder path to hdbroot variable, but it's not working.
I could replicate your error by trying to save to a location that doesn't exist on the machine.
q).Q.dpt[`:/does/not/exist;.z.d;`t]
'/does/not/exist/sym. OS reports: No such file or directory
[0] .Q.dpt[`:/does/not/exist;.z.d;`t]
Like I mentioned in my comment, make sure that the hdbroot variable is exactly the location you're expecting. key can help you determine this, here is a quick helper function for you.
q)exists:{"Folder/file ",$[11=abs type key x;"exists";"does not exist"]}
q)exists`:/does/not/exist
"Folder/file does not exist"
q)exists`:/tmp
"Folder/file exists"

Zip Exception Wrong CRC value when opening a ZIP file - Syncfusion

I have a password protected zip file with 3 folders PFC, STA and SYS. The zip file when loaded for the first time reads all the text files in the PFC folder and display the data onto the screen. I perform some operations on the screeen which generates new files and they are added into the STA and SYS folders and the same initial zip file is updated.
However, when I try to load the same zip file which now should have the all the initial files and folders along with the newly created files in it, it gives me a Wrong CRC Value error. I dont know what am I doing wrong.
We have tried to reproduce the issue by preparing a sample with your scenario. But, we are facing another issue related to password which we will fix in our upcoming release. The sample can be downloaded from the below link .
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Password-1299200154.zip
Kindly modify the sample to reproduce the “CRC value error” issue and update us along with input documents. It will help us to analyze further on this and provide you a solution at earliest.
Note : I work for Syncfusion.
You can send your sample or confidential information in mail to, support#syncfusion.com
Regards,
Mohan.

How to download a file (csv.gz) from a url using Python 3.7

As with others who have posted in the past, I cannot figure out to download a csv.gz file from a URL in Python 3.7. I see posts but they only post a 2kb file.
I am a 100% newbie using Python. What follows is the code for one file that I am trying to obtain. I can't even do that. The final goal would be to request all files that start with 2019* using python. Please try the code below to save the file. As others stated, the file is just a name without the true content - Ref: Downloading a csv.gz file from url in Python
import requests
url = 'https://public.bitmex.com/?prefix=data/trade/20191026.csv.gz'
r = requests.get(url, allow_redirects=True)
open('20191026.csv.gz', 'wb').write(r.content)
Yields:
Out[40]:
1245
I've tried "wget" and urllib.request along with "urlretrieve" also.
I wish I could add a screenshot or attach a file. The file created is 2kb and not even a csv.gz file. But the true file that I can download from a web browser is 78mb. The file is 20191026.csv.gz not that it matters as they all do the same thing. The location is https://public.bitmex.com/?prefix=data/trade/
Again, if you know of a way to obtain all the files using a filter such that 2019*csv.gz would be fantastic.
You are trying to download the files from https://public.bitmex.com/?prefix=data/trade/.
To achieve your final goal of download all the files starting from 2019* you have to do in 3 steps
1) you read the content of https://public.bitmex.com/?prefix=data/trade/
2) convert the content into an list, from that filter out the file names which starting from 2019.
3) from the result list try to download the csv using the example which you referring.
Hope this approach will help you
Happy coding.

Moodle local plugins and save_file

I've created a working form within a local plugin and it is inserting data fine into my custom table.
What I want tyo add now is a filepicker element that upon saving the form puts the file into a specified folder.
The filep[icker itself works fine but when I save the form no file appears, the code I'm using looks like this:
$mform->save_file('lowresCh', '/my_form/', false);
I've tried various things in the 'my_form' bit, but to no avail. The rest of the form still puts its data into the custom table and I can see my file in the mdl_files table (marked as draft).
With full debugging on I can get a warning of:
Warning: copy(/my_form/): failed to open stream: Is a directory in /...../lib/filestorage/stored_file.php on line 390
I don't know if I'm approaching it incorrectly or not, any help or pointers in the right direction would be most appreciated. 
Oh and I have read the Using the File API in Moodle forms page, useful in getting me to the point I'm at, but no further.
I solved it by using the filename as the second argument in save_file() and if I prepend a directory then all of the files will be saved within my plugin in a sub directory which is perfect.
So it looks like this now:
$mform->save_file('lowresCh', 'files/'.$mform->get_new_filename('lowresCh'), false);

addToFolder(): The copy version of the file is deleted, if the original version is deleted

I started doing development with google scripts few days ago and recently joined stackoverflow. I have a problem with addToFolder() function. I have the following piece of code that copies my new spreadsheet into a folder (test/sheets) in my Google Drive:
var ss = SpreadsheetApp.create("test");
var ssID = ss.getId();
DocsList.getFileById(ssID).addToFolder(DocsList.getFolder("test/sheets"));
My problem is that now I have 2 versions of the same file (one in the root of my Google Drive folder and the other in test/sheets folder), whenever I try to delete either of the copies, the other copy is deleted as well. Is there a way to delete the old file and keep the new one OR is there a way to create the file in the desired folder in first place?
EDIT :
thanks for you quick response. I played with this for couple of hours but still have problem copying the file to the destination folder. The problem is that even when I use makeCopy Method of the file, still addToFolder is the only option to mention the folder. Again this ends up having the tagged filename in the destination folder.
I had the same problem with the copy method.
Here is my new Code:
var SetLocationFile = "icompare/sheets/stocks"
var FolderID = DocsList.getFolder(SetLocationFile);
var FileID = DocsList.getFileById(ssID);
FileID.makeCopy("test3").addToFolder(FolderID);
Folders in Google Docs\Google Drive are actually tags. When you "add" a file to the folder "test/sheets", you do not make a copy of your file, you just attach the tag "test/sheets" to it. Now the same file is shown both in the "test/sheets" folder (i.e. in the list of all files with the tag "test/sheets") and in the root. If you wish to make a copy of the file, you should use the copy method. (Please let me know if I just misunderstand your question.)
I realize this is an old questions but you can simply use .removeFromFolder(DocsList.getRootFolder()); to remove the file from the root folder.
I would also like to know the answer to this question.. seems rather "weird" that the API does not even provide a way to create spreadsheets and place them in a certain map? And no, I do not want a Copy of the file, I want the file to be in a specific map and in no other map...