web2py issue import module pynetdicom

51 views
Skip to first unread message

Johannes Schmidt

unread,
Jan 3, 2020, 11:43:15 AM1/3/20
to web2py-users
Hello,

I am new to this forum and to web2py in general.
Thx to the great turotials till now everything works perfect.
But now i am facing an issue i can't solve / can't understand.

I installed a module pynetdicom (via pip) and copied the files into my application/modules folder.

from pydicom.dataset import Dataset
#from pynetdicom import AE
#from pynetdicom.sop_class import ModalityWorklistInformationFind

import of the first module works.
BUT the import of the second and third module leads to error messages.

from pydicom.dataset import Dataset
from pynetdicom import AE
#from pynetdicom.sop_class import ModalityWorklistInformationFind

-->

<type 'exceptions.ImportError'> No module named applications.STUDIO_4K.modules.ssl

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
Traceback (most recent call last):
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\applications\STUDIO_4K\controllers/default.py", line 16, in <module>
from pynetdicom import AE
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\gluon\custom_import.py", line 85, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
File "applications\STUDIO_4K\modules\pynetdicom\__init__.py", line 28, in <module>
from pynetdicom.ae import ApplicationEntity as AE
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\gluon\custom_import.py", line 85, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
File "applications\STUDIO_4K\modules\pynetdicom\ae.py", line 14, in <module>
from pynetdicom.transport import (
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\gluon\custom_import.py", line 85, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
File "applications\STUDIO_4K\modules\pynetdicom\transport.py", line 12, in <module>
import ssl
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\gluon\custom_import.py", line 80, in custom_importer
raise ImportError("No module named %s" % modules_prefix)
ImportError: No module named applications.STUDIO_4K.modules.ssl

from pydicom.dataset import Dataset
# from pynetdicom import AE
from pynetdicom.sop_class import ModalityWorklistInformationFind

-->

<type 'exceptions.ImportError'> cannot import name events

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Traceback (most recent call last):
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\applications\STUDIO_4K\controllers/default.py", line 17, in <module>
from pynetdicom.sop_class import ModalityWorklistInformationFind
File "C:\Users\jschmidt\Downloads\web2py_win\web2py\gluon\custom_import.py", line 85, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
File "applications\STUDIO_4K\modules\pynetdicom\__init__.py", line 27, in <module>
from pynetdicom import events as evt
ImportError: cannot import name events


I hope somebody can help me and tell me where my error is.

BR, Johannes 
Reply all
Reply to author
Forward
0 new messages