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

Error running rxnorm_graph.py #4

Closed
gpinkham opened this issue Mar 10, 2017 · 4 comments
Closed

Error running rxnorm_graph.py #4

gpinkham opened this issue Mar 10, 2017 · 4 comments

Comments

@gpinkham
Copy link

Tried to run the rxnorm_graph command but it errors out immediately. Admittedly I'm not a python guy so quite possible it's my environment. But I have requests and graphviz modules installed..

python rxnorm_graph.py 316074
Traceback (most recent call last):
  File "rxnorm_graph.py", line 22, in <module>
    rx = RxNormCUI(rxcui)
  File "/Users/gpinkham/dev/py-umls/rxnorm.py", line 405, in __init__
    super().__init__(rxcui, rxcui)
TypeError: super() takes at least 1 argument (0 given)

I also tried with the CUI you used in the readme. same error..

@p2
Copy link
Collaborator

p2 commented Mar 10, 2017

Yes, that's an error occurring in Python 2, you'll have to use Python 3.x.

@gpinkham
Copy link
Author

ok I will try that.. I changed the code to: GraphableObject.__init__(self, rxcui, rxcui) which worked for the moment but failed trying to read the rxnconso table (not found).. I will update to python 3 and reset the code and try again.. (and I ran rxnorm.sh to import the rrf's).. thanks!!!

@gpinkham
Copy link
Author

thanks.. updating to Python3 fixed that issue. . I still get "no such table: rxnconso" despite running the importer. I even deleted the previous import and reran it.. I have a 1.9gb rxnorm.db file so seems like it has data.. the importer reported "indexing RXNCONSO table".. so seems like it should be there..

@gpinkham
Copy link
Author

Figured it out.. running this command: databases/rxnorm.sh ~/Downloads/RxNorm_full_04042016 from the root of the project created the rxnorm.db file in the root of the project but the rxnorm.py code looks for it in the databases directory. I guess the command should be run as ./rxnorm.sh ~/Downloads/RxNorm_full_04042016 inside the databases directory.. still having issues with tables not found (this time va_cache) but I'll close this out and put this aside till later (need to do my day job now).. many thanks! cool tool..

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