[ase-users] Converting old trajectory files does not work

Michael Walter Michael.Walter at fmf.uni-freiburg.de
Mon Nov 4 11:29:48 CET 2019


Dear all,

If I try to use the attached (old) trajectory file, I get

ase: error: DeprecationWarning: Please stop using old trajectory files!
Convert to the new future-proof format like this:

    $ python -m ase.io.trajectory 64.rho_2.2-quench.final.traj

To get a full traceback, use: ase -T gui ...

That's all fine, except that python might be python2. But if I try to
follow the advice

> python -m ase.io.trajectory 64.rho_2.2-quench.final.traj
/local_data/tmp/walt/anaconda3/lib/python3.6/runpy.py:125: RuntimeWarning:
'ase.io.trajectory' found in sys.modules after import of package 'ase.io',
but prior to execution of 'ase.io.trajectory'; this may result in
unpredictable behaviour
  warn(RuntimeWarning(msg))
version 3
/local_data/tmp/walt/source/ase/trunk/ase/io/pickletrajectory.py:559:
UserWarning: Could not unpickle constraints!
  warnings.warn('Could not unpickle constraints!')
self.fd= <_io.BufferedReader name='64.rho_2.2-quench.final.traj'>
Traceback (most recent call last):
  File "/local_data/tmp/walt/anaconda3/lib/python3.6/runpy.py", line 193,
in _run_module_as_main
    "__main__", mod_spec)
  File "/local_data/tmp/walt/anaconda3/lib/python3.6/runpy.py", line 85, in
_run_code
    exec(code, run_globals)
  File "/local_data/tmp/walt/source/ase/trunk/ase/io/trajectory.py", line
440, in <module>
    main()
  File "/local_data/tmp/walt/source/ase/trunk/ase/io/trajectory.py", line
436, in main
    convert(name)
  File "/local_data/tmp/walt/source/ase/trunk/ase/io/trajectory.py", line
420, in convert
    for atoms in PickleTrajectory(name, _warn=False):
  File "/local_data/tmp/walt/source/ase/trunk/ase/io/pickletrajectory.py",
line 355, in next
    return self[len(self.offsets) - 1]
  File "/local_data/tmp/walt/source/ase/trunk/ase/io/pickletrajectory.py",
line 293, in __getitem__
    d = pickle.load(self.fd)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 0:
ordinal not in range(128)

I am not so much aware of the pickle format to fix this, so help would be
appreciated.

Best,
Michael

-- 
------------------------------------------
PD Dr Michael Walter
Addresses:
- Fraunhofer IWM, Wöhlerstrasse 11, D-79108 Freiburg i. Br., Germany
  Tel.: +49 761 5142 296
- FIT Freiburg Centre for Interactive Materials and Bioinspired
Technologies, Georges-Köhler-Allee 105, 79110 Freiburg, Germany
  Tel: +49 761 203 95072
email: Michael.Walter at fmf.uni-freiburg.de
www: http://www.functional-nanosystems.uni-freiburg.de/People/PDWalter/group
publications: http://scholar.google.com/citations?user=vlmryKEAAAAJ&hl=en
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20191104/745f8e56/attachment.html>


More information about the ase-users mailing list