datasets / covid-19

Novel Coronavirus 2019 time series data on cases
https://datahub.io/core/covid-19
1.16k stars 604 forks source link

unable to open database file #7

Closed karthikkunala closed 4 years ago

karthikkunala commented 4 years ago

Hi, When I try to run in Jupyter notebook, am getting error as unable to open database file.

OperationalError: unable to open database file

SavoX2 commented 4 years ago

Any update on this?

eemberda commented 4 years ago

I also encountered the same: Traceback (most recent call last): File "process.py", line 39, in 'aggregate': 'first' File "C:\ProgramData\Anaconda3\lib\site-packages\dataflows\processors\join.py", line 363, in join return join_aux(source_name, source_key, source_delete, target_name, target_key, fields, full, mode) File "C:\ProgramData\Anaconda3\lib\site-packages\dataflows\processors\join.py", line 172, in join_aux db_keys_usage = KVFile() File "C:\ProgramData\Anaconda3\lib\site-packages\kvfile\kvfile.py", line 19, in init self.db = DB_ENGINE.connect(self.tmpfile.name) sqlite3.OperationalError: unable to open database file

SavoX2 commented 4 years ago

@zelima it would appear multiple people have this same exact problem? Is there a solution for it?

zelima commented 4 years ago

@karthikkunala are you also using windows?

I have no idea, but after googling a bit it might be related to insufficient permission for sqlite. See https://github.com/gunthercox/ChatterBot/issues/1044#issuecomment-340230752 also https://serverfault.com/a/57597

Usually sqlite db file will created in current directory. Due to lack of permission sqlite unable to create db.sqlite3 file on your current directory.

rufuspollock commented 4 years ago

@karthikkunala can you give more detail of how you are trying to use this so we can help debug?

odev954 commented 4 years ago

Hi, I just opened up the project, and after I run the code 'process.py' I received the same error. Here is my traceback: Traceback (most recent call last): File "C:\Users\user\Desktop\covid-19\process.py", line 44, in 'aggregate': 'first' File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\dataflows\processors\join.py", line 363, in join return join_aux(source_name, source_key, source_delete, target_name, target_key, fields, full, mode) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\dataflows\processors\join.py", line 172, in join_aux db_keys_usage = KVFile() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\kvfile\kvfile.py", line 19, in init self.db = DB_ENGINE.connect(self.tmpfile.name) sqlite3.OperationalError: unable to open database file

odev954 commented 4 years ago

It's made the program crash every time I tried to run it.

rufuspollock commented 4 years ago

@odev954 why are you trying to run it? That's the data collection script.

odev954 commented 4 years ago

Capture

anuveyatsu commented 4 years ago

@karthikkunala @SavoX2 @eemberda @odev954 hi all, can you try to follow updated instructions - https://github.com/datasets/covid-19#preparation ? Also, make sure you're using python v3.6 or newer.

odev954 commented 4 years ago

I followed the updated preparation instructions but I still got the same error as before after I run the 'process.py' script. I am currently running it in python v3.6.8 on Windows 10. Here is the traceback I received: Traceback (most recent call last): File "process.py", line 44, in <module> 'aggregate': 'first' File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\dataflows\processors\join.py", line 363, in join return join_aux(source_name, source_key, source_delete, target_name, target_key, fields, full, mode) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\dataflows\processors\join.py", line 172, in join_aux db_keys_usage = KVFile() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\kvfile\kvfile.py", line 19, in __init__ self.db = DB_ENGINE.connect(self.tmpfile.name) sqlite3.OperationalError: unable to open database file

odev954 commented 4 years ago

after I run the project on my VM (OS: Ubunto) the project is working and the process.py is running successfully, maybe it's because the 'dataflows' package is not so supported currently in Windows or has some issues.

midhunxavier commented 4 years ago

I'm also getting the same error. I have followed the instructions and using python version greater 3.6 on windows machine.

Traceback (most recent call last):
  File ".\scripts\process.py", line 90, in <module>
    join(
  File "C:\Users\midhu\Documents\midhun\covid 19 projects\envs\covid19_1_env\lib\site-packages\dataflows\processors\join.py", line 363, in join
    return join_aux(source_name, source_key, source_delete, target_name, target_key, fields, full, mode)
  File "C:\Users\midhu\Documents\midhun\covid 19 projects\envs\covid19_1_env\lib\site-packages\dataflows\processors\join.py", line 172, in join_aux
    db_keys_usage = KVFile()
  File "C:\Users\midhu\Documents\midhun\covid 19 projects\envs\covid19_1_env\lib\site-packages\kvfile\kvfile.py", line 19, in __init__
    self.db = DB_ENGINE.connect(self.tmpfile.name)
sqlite3.OperationalError: unable to open database file
anuveyatsu commented 4 years ago

I can confirm that this is windows specific issue. Here is the tracker - https://github.com/datahq/dataflows/issues/57

anuveyatsu commented 4 years ago

Closing this as WONTFIX