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

When i run generateLabels.py file i got unable to open database file error #12

Open
sysramthiru opened this issue Apr 28, 2020 · 9 comments

Comments

@sysramthiru
Copy link

When i run the python script i got the following error. How to fix this issue ? Please help me.

D:\OfficeWorks\Sytora\sytora>python generateLabels.py
Traceback (most recent call last):
File "generateLabels.py", line 35, in
conn = sqlite3.connect('./flaskapp/databases/umls.db')
sqlite3.OperationalError: unable to open database file

image

@paulowe
Copy link

paulowe commented May 8, 2020

Still working on a fix for this myself.. Please let me know if you figured it out

@saisk8
Copy link

saisk8 commented Aug 26, 2020

In the directory flaskapp/umls/databases you will find a file umls.sh. Run it, and you will be greeted with the relevant instructions.

That script should generate the required files for you to run the above commands.

Edit: I'm sorry, I did not notice that the path I gave was incorrect (flaskapp/umls). This has been corrected.

@gmanc2
Copy link

gmanc2 commented Dec 8, 2020

In the directory flaskapp/umls you will find a file umls.sh. Run it, and you will be greeted with the relevant instructions.

That script should generate the required files for you to run the above commands.

The umls.sh just runs blank and does not download any of the files correctly.

@projectwehelp
Copy link

In the directory flaskapp/umls you will find a file umls.sh. Run it, and you will be greeted with the relevant instructions.
That script should generate the required files for you to run the above commands.

The umls.sh just runs blank and does not download any of the files correctly.

Did you find a fix to this issue?
Many thanks,

@saisk8
Copy link

saisk8 commented Feb 8, 2021

Please note that to execute the script, you will need to download the data from here as the instructions indicate when you run the file. Also, I have edited my previous comment with an updated path. Please try again.

@projectwehelp
Copy link

The umls files has been downloaded and step 2 generate labels was run, that's where the error comes. How did you address this?

@saisk8
Copy link

saisk8 commented Feb 11, 2021

I think I am missing out on something, but here are the steps you need to follow:

  1. Download the umls data.
  2. You will then need to extract data.
  3. Place every downloaded file, including '.zip', into the extracted directory.
  4. Run the respective 'runXX' script inside the directory; the MetamorphoSys Java GUI will open.
  5. Click "Install UMLS", as source directory select the just extracted directory and your chosen target directory.
  6. Leave the checkboxes alone and click OK.
  7. Now you must generate a configuration and in order to be able to proceed, save the configuration via a command from the menu bar.
  8. Then select "Begin Subset", also from the menubar, to start the extraction process.
  9. This should extract all the things and put in in the selected directory, which now contains a META directory with all the files we need to proceed.
  10. Once you have done this, run umls.sh script with the correct path as the first argument. This will create the necessary file (umls.db)
  11. Now run generate labels script.

The steps that I outline here are exactly what the umls.sh script outputs as an error.

@projectwehelp
Copy link

I think I am missing out on something, but here are the steps you need to follow:

  1. Download the umls data.
  2. You will then need to extract data.
  3. Place every downloaded file, including '.zip', into the extracted directory.
  4. Run the respective 'runXX' script inside the directory; the MetamorphoSys Java GUI will open.
  5. Click "Install UMLS", as source directory select the just extracted directory and your chosen target directory.
  6. Leave the checkboxes alone and click OK.
  7. Now you must generate a configuration and in order to be able to proceed, save the configuration via a command from the menu bar.
  8. Then select "Begin Subset", also from the menubar, to start the extraction process.
  9. This should extract all the things and put in in the selected directory, which now contains a META directory with all the files we need to proceed.
  10. Once you have done this, run umls.sh script with the correct path as the first argument. This will create the necessary file (umls.db)
  11. Now run generate labels script.

The steps that I outline here are exactly what the umls.sh script outputs as an error.

I did these and these works seemingly fine, the error comes in step 11 .

Are there any prerequisite for umls.sh & generate labels script ? mysql vs sqlite etc?

@devilals
Copy link

Running generate labels script is generating labels with huge size. It is already 130GB and counting. My laptop space is already full.

Can you please suggest if I am on the right path and how much total space it will take? Also if I am taking any wrong step and someone can correct me.

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

6 participants