sytora icon indicating copy to clipboard operation
sytora copied to clipboard

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

Open sysramthiru opened this issue 4 years ago • 9 comments

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

sysramthiru avatar Apr 28 '20 08:04 sysramthiru

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

paulowe avatar May 08 '20 18:05 paulowe

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.

saisk8 avatar Aug 26 '20 13:08 saisk8

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.

gmanc2 avatar Dec 08 '20 17:12 gmanc2

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,

projectwehelp avatar Feb 08 '21 08:02 projectwehelp

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.

saisk8 avatar Feb 08 '21 08:02 saisk8

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

projectwehelp avatar Feb 09 '21 08:02 projectwehelp

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.

saisk8 avatar Feb 11 '21 04:02 saisk8

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?

projectwehelp avatar Feb 12 '21 02:02 projectwehelp

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.

devilals avatar Sep 22 '21 05:09 devilals