Closed AbsoluteRay closed 4 years ago
Short version of "o" input has the long version "output-file", and from example you included, very useful, by the way, you have provided a folder not a file.
"converter.py" takes 1 or multiple files as input and outputs content to a single output file (if output format is not specified, "hyper" is implied as default value, which is the extension of a Tableau Extract).
Hope this helps!
thanks for the reply! however I am still seeing the same error after trying various expressions, like replacing "\" with "/" and correcting uppercase & lowercase letters, attached the screenshot, please take a look
I see you are using relative file name where as absolute ones (file name + its folder where file can be retrieved from is expected). Please add respective folder for both input and output file.
tried to add full path but got the same error, is there a way to figure out which parameter leads to the error?
Analyzing in depth your error, I have seen the folder check is for the Log file and since the relevant parameter for such is not set, default value is string 'None' which is not treated during verification, which is a BUG, will work and post a fix in few minutes, once new version is issued on both GitHub and pypi.org will post another comment here.
Thank you for highlighting this and apologies for headache this has created to you!
Update done, please upgrade to 1.5.3 to eliminate this error.
Update done, please upgrade to 1.5.3 to eliminate this error.
wow thank you very much, the same message doesn't show up any more.
however a new error relating to encoding appears... my input file contains Chinese characters and is in UTF-8 and UNIX-newline converted using notepad++, I am using Win10 simplified Chinese version. if this new error relates to my specific language environment could you do a compatibility fix. (I am just an average data analyst and newbie to Python, hope you don't mind :))
Update done, please upgrade to 1.5.3 to eliminate this error.
wow thank you very much, the same message doesn't show up any more.
however a new error relating to encoding appears... my input file contains Chinese characters and is in UTF-8 and UNIX-newline converted using notepad++, I am using Win10 simplified Chinese version. if this new error relates to my specific language environment could you do a compatibility fix. (I am just an average data analyst and newbie to Python, hope you don't mind :))
Would you be so kind to send a small sample of such file so I can replicate error and find solution?
I have tried with a simple file UTF-8 with some Chinese characters (randomly chosen) and Unix line endings and everything is ok on my system. See file in archive below test.zip
So a small sample could be very useful to see what's different in your case.
Meanwhile, possible solution is already included in newest version I just released, where I attempted to force-convert content of file at exact line where you have a fatal error, more details here: https://github.com/danielgp/tableau-hyper-management/commit/53a12f6ac4eaafc0a52e4c76615ddb81a7ae3153
I have downloaded your latest code and the test.csv file, and got the same error."UnicodeDecodeError: 'mbcs' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page."
then I did some analysis and change line 119 of FileOperations.py to " try: file_handler = open(file=file_to_evaluate, mode='r', encoding='utf-8')" then it can generate the hyper file but show another error."UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 80: invalid start byte"
it seems that the "try" did not really goes to "except" when there is "UnicodeDecodeError"
I have downloaded your latest code and the test.csv file, and got the same error."UnicodeDecodeError: 'mbcs' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page."
then I did some analysis and change line 119 of FileOperations.py to " try: file_handler = open(file=file_to_evaluate, mode='r', encoding='utf-8')" then it can generate the hyper file but show another error."UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 80: invalid start byte"
it seems that the "try" did not really goes to "except" when there is "UnicodeDecodeError"
Would you be so kind to commenting lines between 119 and 130 (before "try" until before "return") by placing a 3 single quotes before and after mentioned line numbers? If this is the only issue (checksum generation) I could add an input parameter to switch such logic off.
yes, it now works without errors!
In such case I will adjust the package to have checksum of files calculated only upon express request with a default value as "No" and will add a note that may not work in some case (like your case with Chinese characters in a Chinese/Japanese Windows 10). This is helpful, thank you for your patience.
As soon as I will release new version, will let you know by posting a new comment here.
Just release version 1.5.6 which should work out of the box in your case as well. Should you be curious on what code adjustments were required you can consult this commit: https://github.com/danielgp/tableau-hyper-management/commit/b63b819179b12b7ed6958444b7f5e82613cc658f
Please confirm everything is working ok, so I can close this issue.
In such case I will adjust the package to have checksum of files calculated only upon express request with a default value as "No" and will add a note that may not work in some case (like your case with Chinese characters in a Chinese/Japanese Windows 10). This is helpful, thank you for your patience.
As soon as I will release new version, will let you know by posting a new comment here.
I tried to convert one more bigger csv file (>1GB) and it works as expected, it's so convenient to have this one step .hyper generator. Again, thank you so much for the kind help!
Thank you for confirmation and glad it's working fine for you. Now I will close this issue.
hello, please help, I'm stuck at below output, any idea is appreciated!
D:\Downloads\tableau-hyper-management-master\virtual_environment\Scripts>python D:\Downloads\tableau-hyper-management-master\sources\converter.py -i D:\Downloads\tableau-hyper-management-master\34095_20170502 -f csv -o D:\Downloads 2020-05-30 15:39:38.736334 - File D:/Downloads/tableau-hyper-management-master/sources/config/tableau-hyper-management.json has just been opened 2020-05-30 15:39:38.736334 - JSON structure interpreted 2020-05-30 15:39:38.738334 - Given folder "" does not exist