|
Hi Jiba,
I have tried again to run the python script:
from owlready2 import *
from owlready2.pymedtermino2 import *
from owlready2.pymedtermino2.umls import *
default_world.set_backend(filename = "pym.sqlite3")
import_umls("umls-2018AB-full.zip", terminologies = ["ICD10", "SNOMEDCT_US", "CUI"])
default_world.save()
I have an other error:
* Owlready2 * Warning: optimized Cython parser module 'owlready2_optimized' is not available, defaulting to slower Python implementation
Importing UMLS from 2018AB-full/2018ab-1-meta.nlm...
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\zipfile.py", line 1171, in _RealGetContents
endrec = _EndRecData(fp)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\zipfile.py", line 241, in _EndRecData
fpin.seek(0, 2)
io.UnsupportedOperation: seek
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Script5.py", line 5, in <module> import_umls("umls-2018AB-full.zip", terminologies = ["ICD10", "SNOMEDCT_US", "CUI"])
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\owlready2-0.17-py3.6.egg\owlready2\pymedtermino2\umls.py", line 666, in import_umls
with zipfile.ZipFile(umls_zip.open(filename), "r") as umls_inner_zip:
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\zipfile.py", line 1108, in __init__
self._RealGetContents()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\zipfile.py", line 1173, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
How do I can resolve?
Many thanks.
Hamico
|