Skip to content

Not Python3 compatible. #4

Closed
Closed

Description

@markkness

ColorPy at present is only Python2.x, it would be better if Python3 was also supported.

Some culprits are old-style print statements, and some exception raising syntax.

Activity

  1. PanderMusubi commented on Jan 24, 2015

    @PanderMusubi

    Working on it

  2. PanderMusubi commented on Jan 24, 2015

    @PanderMusubi

    See #5

  3. markkness commented on Feb 12, 2015

    @markkness
    OwnerAuthor

    The current master is now hoped to be Python 3 compatible, though it has not been explicitly tested.

  4. markkness commented on Feb 28, 2015

    @markkness
    OwnerAuthor

    I just installed Python 3, and can confirm that the current master does run fine with it.

  5. markkness commented on Mar 11, 2015

    @markkness
    OwnerAuthor

    Closing this issue as this is now thought Python 3 compatible, and I have tools set up to keep it such.

  6. guillochon commented on Jan 11, 2016

    @guillochon

    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:

    ImportError: No module named 'colormodels'
    
  7. avsparry commented on Jun 16, 2021

    @avsparry

    i still have this error can anyone explain how to reinstall/update

  8. hiwigiwi commented on Feb 9, 2022

    @hiwigiwi

    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]:

    1. 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)
    1. 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')

    save both files and stuff works...for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions