I always have issues importing csv (products) into Magneto. No matter what I do I always get errors that don't make any sense and I can never import anything. I am on a mac and I've read that this can cause issues so I've been updating everything in google docs and then downloading it as a CSV. The current error I have is:
"Can not find required columns: sku"
Which is a column in my CSV file.
If you're using a Mac, you need to ensure that you are saving your CSV:
In UTF-8 encoding
as CSV (Windows) file type
If you want to deal with it manually, what you'll need to do is find and replace the line breaks in the file. From the command line:
tr '\r' '\n' < file_excel_munged.csv >| fixed_file.csv
But just saving it was a Windows CSV/Excel file should do the trick.
I resolved this same issue today by saving as UTF-8 without BOM. By default I believe Excel will save with a BOM. Magento should really be smart enough to recognize the BOM imho.
Related
I work with CSV files and upload them to an S3 server.
Sometimes after a small process that I did with the file I get hidden characters to look like this  before the first columns, I want to write a script that "clean" the files before upload but I can see those characters only on specific text editors like nano, the python didn't recognize those characters and I can see them in Amazon Athena after the query was created already and I need to upload it again.
Does anyone know a solution to this problem?
After a small research I learn that the symbol called BOM and they added to the files because I added encoding='utf-8'.
So I'm trying to compress some documents I made when I get the following error message:
I have no idea what the character is, as it just looks like a blank space. I have removed the blank spaces from my documents and it still won't let me zip it. Online answers seem to refer to needing the change the language setting on my computer, but I haven't written any foreign languages. Any help would be appreciated.
Go to Users directory and make a new directory called 'Analytics',
Then, move you 'Account_Over_Time_Analysis' to this folder and try to comporess again.
If it fails again, please try 7zip incase your using something else.
Such an error could be caused from different language dir-name, a name with spaces or a name with escape chars.
To fix this you could hunt around for the correct language pack, or just install 7-Zip and use that to zip the files instead
I am using OpenSSL (from https://slproweb.com/products/Win32OpenSSL.html) to decrypt a file retrieved from external sftp site. The external site is publishing new files daily, each with new filenames. At the moment when the file is downloaded I have to manually go into Openssl.exe and type the following each time
C:\OpenSSL-Win64\bin\openssl.exe cms –decrypt –inkey C:\key.pem –recip C:\cert.pem –inform DER –in \\server01\filename.xml.crypt –out \\server01\Decrypt\filename.xml
I tried putting this in a batch file (*.bat) but when I ran that it did not work. The only thing that I have managed to get to work is the manual process described above.
Is there a way to automate this and avoid having to manually type the whole code above? I should mention the filename.xml.crypt is actually normally around 100 characters long...
Ideally looking at a windows batch file, or something similar?
Sorry if this is a stupid question!
TIA
Hamez
I'm also having the exact same issues. The hyphen '-' is being converted to the accented u (i.e. -recip, -inform etc). No doubt we've all copied it from a webpage and that has altered the code base of the hyphen. I've just manually inputted the - for all the command line parameters and now it's worked.
This should be simple, but what is the correct syntax for an Oracle sqlldr control file in order to specify tab delimited/separated data?
FWIW, I found the file was UTF16 and not UTF8, and was editing fine but would introduce null bytes as Oracle read the control file. Can't even replicate today.
Per this thread, it should be fields terminated by '\t' (don't have an Oracle installation at hand to verify that this is correct).
When I open a file in eclipse it shows with the improper line spacing showing an extra line break between every line. When I open the file with notepad or wordpad it doesn't show these extra line breaks that only eclipse shows. How do I get eclipse to read these files like notepad and wordpad without those line breaks?
-edit: I don't have this problem with all files but only a select few where I have made local changes > uploaded them to our sun station > then pulled those files back to my local workstation for future modifications.
Eclipse should have a File -> Convert Line Delimiters To... option that may correct this for you. (If it doesn't work on your file, this article may help.)
Really, though, you should have your file transfer program treat your source files as ascii instead of binary. Then your line ending problem should be moot.
It's possible that the server (or something in-between) is replacing all your CR+LF with CR LF (separate)?
Try specifically setting the Text File Encoding (Window->Preferences->General->Workspace), or alternatively use File->Convert Line Delimiters To->Windows every time you get the latest version (I know, not ideal).
It turns out that the problem was solved by doing my ftp in binary only, and setting the Eclipse encoding to US-ASCII. I don't fully understand why this fixed the problem but it worked. Thanks for the 2 answers they both lead me to my solution.