question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

joblib doesn't propogate correct exception, raises SyntaxError instead

See original GitHub issue

Whereas multiprocessing propagates the RuntimeError: Error during user-specified initialization

joblib generates a very strange SyntaxError – I have no idea how I could specify an encoding in a compiled extension!

======================================================================
ERROR: test_user_init_unspecified (pystan.tests.test_problems.TestStanfit)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/abr/documents/pystan/pystan-ariddell/pystan/tests/test_problems.py", line 30, in test_user_init_unspecified
    pystan.stan(model_code=model_code, iter=10, chains=1, seed=2, data=data, init=[dict(mu=4)], warmup=0)
  File "/home/abr/documents/pystan/pystan-ariddell/pystan/api.py", line 321, in stan
    n_jobs=n_jobs, **kwargs)
  File "/home/abr/documents/pystan/pystan-ariddell/pystan/model.py", line 650, in sampling
    ret_and_samples = Parallel(n_jobs)(delayed(call_sampler_star)(args) for args in call_sampler_args)
  File "/home/abr/documents/pystan/pystan-ariddell/pystan/external/joblib/parallel.py", line 602, in __call__
    self.retrieve()
  File "/home/abr/documents/pystan/pystan-ariddell/pystan/external/joblib/parallel.py", line 480, in retrieve
    self._output.append(job.get())
  File "/usr/lib/python3.3/multiprocessing/pool.py", line 564, in get
    raise self._value
nose.proxy.SyntaxError: invalid or missing encoding declaration for '/tmp/tmp5pc7xw/pystan/stanfit4anon_model_652395f2575ceb009e57546b592d498e.cpython-33m.so'

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danishabdullahcommented, May 7, 2015

+1. Just ran into this issue with pandas.

0reactions
lestevecommented, Jul 27, 2016

I can reproduce the problem with @lmjohns3 and @amueller snippets above, I’ll try to take a look in the upcoming days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'joblib' from 'sklearn. ...
I suspect your model_d2v_version_002 file was saved from an older version of scikit-learn , and you're now using scikit-learn (aka sklearn ) ...
Read more >
Pyodide
Pyodide is a port of CPython to WebAssembly/Emscripten. Pyodide makes it possible to install and run Python packages in the browser with ...
Read more >
How to Save and Load Your Keras Deep Learning Model
Is there a way to save the weights into a variable rather than loading and assigning ... Keras doesn't seem to have any...
Read more >
Release 0.19.1 unknown
Any solution that is able to host static files and correctly sets WASM MIME type, and CORS headers would work.
Read more >
Development — joblib 1.3.0.dev0 documentation
None as the resulting numpy.memmap object would not be able to correct the ... Raises a more explicit exception when a corrupted MemorizedResult...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found