prody / ProDy

A Python Package for Protein Dynamics Analysis
http://prody.csb.pitt.edu
Other
417 stars 152 forks source link

TypeError ('float' object cannot be interpreted as an integer) #269

Closed sagitter closed 8 years ago

sagitter commented 8 years ago

Hi,

please, take a look at these errors of ProDy's tests with Python3.5: prody-python35-tests.txt

ProDy tested on Fedora 24 GCC-6.0 Python-3.5

ERROR: Failure: TypeError ('float' object cannot be interpreted as an integer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3.5/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3.5/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3.5/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.5/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib64/python3.5/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/builddir/build/BUILDROOT/ProDy-1.7.1-5.fc24.x86_64/usr/lib64/python3.5/site-packages/prody/tests/atomic/test_atomic.py", line 19, in <module>
    ATOMS = parseDatafile('multi_model_truncated', subset='ca')
  File "/builddir/build/BUILDROOT/ProDy-1.7.1-5.fc24.x86_64/usr/lib64/python3.5/site-packages/prody/tests/datafiles/__init__.py", line 151, in parseDatafile
    return PARSERS[splitext(fn)[1]](fn, **kwargs)
  File "/builddir/build/BUILDROOT/ProDy-1.7.1-5.fc24.x86_64/usr/lib64/python3.5/site-packages/prody/proteins/pdbfile.py", line 114, in parsePDB
    result = parsePDBStream(pdb, **kwargs)
  File "/builddir/build/BUILDROOT/ProDy-1.7.1-5.fc24.x86_64/usr/lib64/python3.5/site-packages/prody/proteins/pdbfile.py", line 187, in parsePDBStream
    _parsePDBLines(ag, lines, split, model, chain, subset, altloc)
  File "/builddir/build/BUILDROOT/ProDy-1.7.1-5.fc24.x86_64/usr/lib64/python3.5/site-packages/prody/proteins/pdbfile.py", line 549, in _parsePDBLines
    coordsets = np.zeros((diff/acount+1, acount, 3))
TypeError: 'float' object cannot be interpreted as an integer
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 683 atoms and 1 coordinate set(s) were parsed in 0.01s.
.prody: DEBUG: 3211 atoms and 1 coordinate set(s) were parsed in 0.06s.
.prody: DEBUG: 42 atoms and 1 coordinate set(s) were parsed in 0.00s.
.prody: DEBUG: 3211 atoms and 1 coordinate set(s) were parsed in 0.05s.
.prody: INFO: Secondary structures were assigned to 169 residues.
.prody: DEBUG: 683 atoms and 1 coordinate set(s) were parsed in 0.01s.
.prody: DEBUG: 683 atoms and 1 coordinate set(s) were parsed in 0.01s.
.prody: DEBUG: Hessian was built in 0.07s.
.prody: DEBUG: 20 modes were calculated in 0.02s.
.prody: DEBUG: Kirchhoff was built in 0.01s.
.prody: DEBUG: 20 modes were calculated in 0.00s.
.prody: DEBUG: 76 atoms and 1 coordinate set(s) were parsed in 0.00s.
.prody: DEBUG: Hessian was built in 0.07s.
.prody: DEBUG: 228 modes were calculated in 0.03s.
.prody: DEBUG: Kirchhoff was built in 0.00s.
.prody: DEBUG: 76 modes were calculated in 0.00s.
.prody: DEBUG: 28 atoms and 1 coordinate set(s) were parsed in 0.00s.
.prody: INFO: System has 5 blocks largest with 8 of 28 units.
.prody: DEBUG: Hessian was built in 0.00s.
.prody: DEBUG: 683 atoms and 1 coordinate set(s) were parsed in 0.01s.
.prody: DEBUG: 683 atoms and 1 coordinate set(s) were parsed in 0.01s.
.prody: DEBUG: 683 atoms and 1 coordinate set(s) were parsed in 0.01s.
.prody: DEBUG: 25 sequence(s) with 112 residues were parsed in 0.00s.
.prody: DEBUG: 25 sequence(s) with 112 residues were parsed in 0.00s.
.prody: DEBUG: 25 sequence(s) with 112 residues were parsed in 0.00s.
.prody: DEBUG: 25 sequence(s) with 112 residues were parsed in 0.00s.
.prody: DEBUG: 25 sequence(s) with 112 residues were parsed in 0.00s.
.prody: DEBUG: 167 atoms and 1 coordinate set(s) were parsed in 0.00s.
--------------------- >> end captured logging << ---------------------

Thanks.

cihankayacihan commented 8 years ago

We currently does not have a version of Prody for Python 3.5. We have versions for Python 3.4 and Python 2.7.