You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UniConvertor 2.0rc5 build 20210831 fails to convert the attached .CGM file:
λ uniconvertor.exe EW02Y.cgm EW02Y.svg
ERROR | Error while loading "C:\Users\juhau\Downloads\EW02Y.cgm"The file may be corrupted or contains unknown file format.
STOP | Loading is interrupted
The file uc2.log contents:
INFO | 02:32:03 PM | uc2.application --> Translation of "C:\Users\juhau\Downloads\EW02Y.cgm" into "C:\Users\juhau\Downloads\EW02Y.svg"
INFO | 02:32:03 PM | uc2.application --> Start to search saver by file extension svg
INFO | 02:32:03 PM | uc2.application --> Saver is found for extension svg
INFO | 02:32:03 PM | uc2.application --> Start to search for loader by file extension cgm
INFO | 02:32:03 PM | uc2.application --> Loader "cgm_loader" is found for C:\Users\juhau\Downloads\EW02Y.cgm
INFO | 02:32:03 PM | uc2.application --> Parsing in progress...
INFO | 02:32:03 PM | uc2.application --> <CGM> document model is created
INFO | 02:32:03 PM | uc2.application --> <CGM> document model is updated successfully
INFO | 02:32:03 PM | uc2.application --> <SK2> document model is updated successfully
ERROR | 02:32:03 PM | uc2.application --> Error while loading "C:\Users\juhau\Downloads\EW02Y.cgm"The file may be corrupted or contains unknown file format.
ERROR | 02:32:03 PM | uc2.cmds.translate --> Error while loading "C:\Users\juhau\Downloads\EW02Y.cgm"The file may be corrupted or contains unknown file format.
Traceback (most recent call last):
File "/vagrant/uniconvertor-2.0rc5-20210831-win64-portable/libs/uc2/cmds/translate.py", line 89, in convert
File "/vagrant/uniconvertor-2.0rc5-20210831-win64-portable/libs/uc2/formats/cgm/__init__.py", line 39, in cgm_loader
File "/vagrant/uniconvertor-2.0rc5-20210831-win64-portable/libs/uc2/formats/cgm/cgm_presenter.py", line 51, in translate_to_sk2
File "/vagrant/uniconvertor-2.0rc5-20210831-win64-portable/libs/uc2/formats/cgm/cgm_to_sk2.py", line 55, in translate
File "/vagrant/uniconvertor-2.0rc5-20210831-win64-portable/libs/uc2/formats/cgm/cgm_to_sk2.py", line 73, in process_element
File "/vagrant/uniconvertor-2.0rc5-20210831-win64-portable/libs/uc2/formats/cgm/cgm_to_sk2.py", line 360, in _maximum_colour_index
File "/vagrant/uniconvertor-2.0rc5-20210831-win64-portable/libs/uc2/formats/cgm/cgm_const.py", line 445, in create_color_table
ZeroDivisionError: float division by zero
When sz is 1, mc gets calculated to be 0. CGM files I use have " maxcolrindex 1;" command. The one @jupeu attached also has it. I guess this can be fixed easily by changing the while loop's condition at line #423 to a "<=" comparison so mc is set to 1 in the erroneous case.
UniConvertor 2.0rc5 build 20210831 fails to convert the attached .CGM file:
The file uc2.log contents:
EW02Y.zip
The text was updated successfully, but these errors were encountered: