2

struggling to define what is causing this error.

Have anaconda installed and used conda install pysam, worked for a bit but suddenly getting this error

>>> import pysam
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/Nick/anaconda/lib/python2.7/site-packages/pysam/__init__.py", line 125, in <module>
    [ "SamtoolsError", "SamtoolsDispatcher" ] + list(SAMTOOLS_DISPATCH) +\
AttributeError: 'module' object has no attribute '__all__'

Took a look inside the file and the corresponding code is

# hack to export all the symbols from csamtools
__all__ = \
    csamtools.__all__ + \
    ctabix.__all__ + \
    cvcf.__all__ +\
    [ "SamtoolsError", "SamtoolsDispatcher" ] + list(SAMTOOLS_DISPATCH) +\
    ["Pileup" ] 

Any idea on what is causing this???

user3234810
  • 482
  • 2
  • 5
  • 18
  • 1
    Hmh, which OS are you using? It seems to work here on `OSX`. The pysam version of `anaconda` seems not to be up to date. Is pip installing an option for you? – cel Mar 19 '15 at 09:45
  • Yeah have used pip now too. OSX. Tried on work PC which is VM debain and it works with pip. Still broken on mac tho..... – user3234810 Mar 19 '15 at 13:36
  • 1
    Do you get the same error? Seems to work here. – cel Mar 19 '15 at 13:43

1 Answers1

0

Ok, Uninstalled using conda, also uninstalled using pip, then pip reinstalled seemed to fix it.

Still getting some errors with other parts of the module but working on a fix.

Thanks for advice!

user3234810
  • 482
  • 2
  • 5
  • 18