ushahidi / geograpy

Extract countries, regions and cities from a URL or text
219 stars 133 forks source link

sqlite3.OperationalError #25

Open Michael-E-Rose opened 6 years ago

Michael-E-Rose commented 6 years ago

Fresh install on Python3 on Ubuntu 16.04

import geograpy
address = geograpy.get_place_context(text='United States')

results in

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/geograpy/__init__.py", line 9, in get_place_context
    pc = PlaceContext(e.places)
  File "/usr/local/lib/python3.5/dist-packages/geograpy/places.py", line 17, in __init__
    self.conn = sqlite3.connect(db_file)
sqlite3.OperationalError: unable to open database file
naspuka commented 5 years ago

plz I am also having this error

Traceback (most recent call last): File "sm.py", line 36, in pc = places.PlaceContext(['Cleveland', 'Ohio', 'United States']) File "/usr/local/lib/python3.6/dist-packages/geograpy3/places.py", line 34, in init self.conn = sqlite3.connect(db_file) sqlite3.OperationalError: unable to open database file

jamiebull1 commented 5 years ago

This is unmaintained. Try here https://github.com/Corollarium/geograpy2

QLgogo commented 4 years ago

Hi, I have similar issue. When run "geograpy.get_place_context(text=text)" after "import geograpy", I got error "sqlite3.OperationalError: database is locked". Then I turn to geograpy2. But I got issue when installing geograpy2 by "pip install --user geograpy2". The error is "ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output." Anyone can help? Thanks a lot!