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
bit of a hack, but the following fixes the ImportError for me [DISCLAIMER: i have very limited need for this package, so can not guarantee that this will not breaks other stuff, but the functions I relied on 'xyz_from_spectrum' and 'xyz_from_wavelength' work properly after the steps below]:
in ciexyz.py:
replace import colormodels with from . import colormodels
replace all occurences of the xrange function with the range function (the search and replace function of your editor should make this a breeze. there's about 10 instances)
in colormodels.py:
there are 3 occurences of raise which make use of the python2 syntax, namely raise ValueError, 'irgb_string_from_irgb(): Expecting 7 character string like #AB13D2'. This needs to be updated to the python3 syntax raise ValueError('irgb_string_from_irgb(): Expecting 7 character string like #AB13D2')
Activity
PanderMusubi commentedon Jan 24, 2015
Working on it
PanderMusubi commentedon Jan 24, 2015
See #5
markkness commentedon Feb 12, 2015
The current
masteris now hoped to be Python 3 compatible, though it has not been explicitly tested.markkness commentedon Feb 28, 2015
I just installed Python 3, and can confirm that the current
masterdoes run fine with it.markkness commentedon Mar 11, 2015
Closing this issue as this is now thought Python 3 compatible, and I have tools set up to keep it such.
guillochon commentedon Jan 11, 2016
I was not able to get this to work with Python 3.5.1, I get an error when trying to import from
colorpy.ciexyz:avsparry commentedon Jun 16, 2021
i still have this error can anyone explain how to reinstall/update
hiwigiwi commentedon Feb 9, 2022
bit of a hack, but the following fixes the
ImportErrorfor me [DISCLAIMER: i have very limited need for this package, so can not guarantee that this will not breaks other stuff, but the functions I relied on 'xyz_from_spectrum' and 'xyz_from_wavelength' work properly after the steps below]:import colormodelswithfrom . import colormodelsxrangefunction with therangefunction (the search and replace function of your editor should make this a breeze. there's about 10 instances)raisewhich make use of the python2 syntax, namelyraise ValueError, 'irgb_string_from_irgb(): Expecting 7 character string like #AB13D2'. This needs to be updated to the python3 syntaxraise ValueError('irgb_string_from_irgb(): Expecting 7 character string like #AB13D2')save both files and stuff works...for now...