Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import errors #128

Open
CFGrote opened this issue Jan 21, 2020 · 2 comments
Open

Import errors #128

CFGrote opened this issue Jan 21, 2020 · 2 comments

Comments

@CFGrote
Copy link
Collaborator

CFGrote commented Jan 21, 2020

Hi @buzmakov , @samoylv
Thanks for making this new release with many important updates.
I encounter the following import errors after installing the new version via conda.

Executing the 2. cell in samples/App_MID_case_C.ipynb:

<ipython-input-1-72a0440765f5> in <module>
      9 import pylab
     10 
---> 11 import cPickle as pickle
     12 import errno
     13 

Solution would be to include cPickle in the requirements.txt

But even then, I get

ImportError                               Traceback (most recent call last)
<ipython-input-2-261db5d0cd3c> in <module>
     13 
     14 #import SRW core functions
---> 15 from wpg.srwlib import srwl, srwl_opt_setup_CRL, SRWLOptD, SRWLOptA, SRWLOptC, SRWLOptT
     16 
     17 #import SRW auxiliary functions

/gpfs/exfel/data/user/grotec/Codes/WPG/wpg/__init__.py in <module>
     25 
     26 # fix segmentation fault using fftw from numpy mkl
---> 27 from .srw import srwlpy
     28 
     29 # Create aliases for simple importing

ImportError: cannot import name 'srwlpy' from 'wpg.srw' (../wpg/srw/__init__.py)

which looks to me like a naming issue. Can you fix?

Thanks!

@CFGrote
Copy link
Collaborator Author

CFGrote commented Jan 22, 2020

I realize that samples/App_MID_case_C.ipynb is probably not up to date anyway (should remove?).
After reinstalling from scratch, also the second error is gone, so I close this one.

@CFGrote CFGrote closed this as completed Jan 22, 2020
@buzmakov
Copy link
Collaborator

Hi @CFGrote
cPickle is fast pickle library is python2 standard library
In python3 it named just 'pickle'
I should update samples/App_MID_case_C.ipynb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants