markovmodel / PyEMMA

🚂 Python API for Emma's Markov Model Algorithms 🚂
http://pyemma.org
GNU Lesser General Public License v3.0
307 stars 118 forks source link

msm.its UnicodeDecodeError #1424

Closed and-tos closed 4 years ago

and-tos commented 5 years ago

Hi,

I am running into a UnicodeDecodeError when running pyemma.msm.its.

UnicodeDecodeError: 'ascii' codec can't decode byte 0x9a in position 0: ordinal not in range(128)

The discrete trajectories I pass to its seem OK. I would really appreciate any hint on what is happening.

import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import os
import seaborn as sns
from pymol import cmd
import pyemma

...
cluster = pyemma.coordinates.cluster_mini_batch_kmeans(tica_output, k=n_clusters)
dtrajs=cluster.dtrajs
its = pyemma.msm.its(dtrajs, lags=50, errors='bayes')
and-tos commented 5 years ago

The error appears only when running from pymol import cmd

marscher commented 5 years ago

That's strange. How did you manage to pin this down? Are you still on Python 2.7?

Am 22. Juni 2019 14:36:06 MESZ schrieb andt88 notifications@github.com:

The error appears only when running from pymol import cmd

and-tos commented 5 years ago

No I'm running python 3.6. It was the last thing I added to the script before the error started appearing. I just separated the tasks in two different scripts. Not really elegant though.

marscher commented 5 years ago

Could you also please add the list of installed packages (e.g. conda list > pkg.txt or pip list > pkg.txt)?

and-tos commented 5 years ago

Please find attached the requested file. pkg.txt

marscher commented 5 years ago

Thank you. Does upgrading pathos resolve the issue? If not, I would be glad, if you could post the exact stack trace or even better a minimal example producing the error.

and-tos commented 5 years ago

Upgrading did not work. Here's the stack trace: I will make a minimal example later

Traceback (most recent call last):
  File "/Users/andy/.conda/envs/plot.py/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/Users/andy/.conda/envs/plot.py/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/andy/.conda/envs/plot.py/lib/python3.7/site-packages/multiprocess/pool.py", line 470, in _handle_results
    task = get()
  File "/Users/andy/.conda/envs/plot.py/lib/python3.7/site-packages/multiprocess/connection.py", line 254, in recv
    return _ForkingPickler.loads(buf.getbuffer())
  File "/Users/andy/.conda/envs/plot.py/lib/python3.7/site-packages/dill/_dill.py", line 317, in loads
    return load(file, ignore)
  File "/Users/andy/.conda/envs/plot.py/lib/python3.7/site-packages/dill/_dill.py", line 305, in load
    obj = pik.load()
UnicodeDecodeError: 'ascii' codec can't decode byte 0x81 in position 6: ordinal not in range(128)
marscher commented 5 years ago

Thanks. Did the update process also drag in dill-0.3.0?