CellProfiler / python-bioformats

Read and write life sciences file formats
Other
132 stars 46 forks source link

Error importing bioformats #49

Closed chsasank closed 7 years ago

chsasank commented 8 years ago

I installed python-bioformats using: $ pip install python-bioformats

Then I tried:

>>> import javabridge
>>> import bioformats

This gives the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/Sasank/anaconda/lib/python3.4/site-packages/bioformats/__init__.py", line 20, in <module>
    from . import formatreader as _formatreader
  File "/Users/Sasank/anaconda/lib/python3.4/site-packages/bioformats/formatreader.py", line 450
    __omero_server, __omero_port, __omero_username, __omero_password]):
                  ^
SyntaxError: invalid syntax

$ nosetests biofromats gives similar but more verbose error:

E
======================================================================
ERROR: Failure: SyntaxError (invalid syntax (formatreader.py, line 450))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/Sasank/anaconda/lib/python3.4/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/Users/Sasank/anaconda/lib/python3.4/site-packages/nose/loader.py", line 407, in loadTestsFromName
    module = resolve_name(add.module)

  File "/Users/Sasank/anaconda/lib/python3.4/site-packages/nose/util.py", line 312, in resolve_name
    module = __import__('.'.join(parts_copy))
  File "/Users/Sasank/anaconda/lib/python3.4/site-packages/bioformats/__init__.py", line 20, in <module>
    from . import formatreader as _formatreader
  File "/Users/Sasank/anaconda/lib/python3.4/site-packages/bioformats/formatreader.py", line 450
    __omero_server, __omero_port, __omero_username, __omero_password]):
                  ^
SyntaxError: invalid syntax

----------------------------------------------------------------------
Ran 1 test in 0.004s

FAILED (errors=1)

I'm using Anaconda python 3.4 in Mac OS X 10.11.3.

Please resolve this.

Sasank.

LeeKamentsky commented 8 years ago

Bioformats doesn't yet support Python 3. We'd welcome a pull request for that. I may take a look at adding Python 3 support, but it is outside of the scope of our project.

chsasank commented 8 years ago

Alright, I'll work on it in my free time. javabridge supports python3 right?

LeeKamentsky commented 8 years ago

Yup - as of last week it supports Python 3. Thx for your help.