django-cities-light icon indicating copy to clipboard operation
django-cities-light copied to clipboard

Stuck at manage.py cities_light

Open leryowwei opened this issue 4 years ago • 5 comments

Hi, when I am using the command 'python manage.py cities_light', my code seems to be stuck at downloading the second file. May I know how can I resolve this problem? Thanks.

---- From command window ---- Assuming local download is up to date for http://download.geonames.org/export/dump/countryInfo.txt Assuming local download is up to date for http://download.geonames.org/export/dump/admin1CodesASCII.txt

leryowwei avatar Mar 08 '21 21:03 leryowwei

Can you post all output instead of truncated output please?

jpic avatar Mar 09 '21 10:03 jpic

/jobs # /venv/bin/python manage.py cities_light --force-import-all 2023-03-14 12:05:44,514 cities_light WARNING Assuming local download is up to date for http://download.geonames.org/export/dump/countryInfo.txt 2023-03-14 12:05:44,515 cities_light INFO Forced import of countryInfo.txt because data do not seem to have installed successfuly yet, note that this is equivalent to --force-import-all. 2023-03-14 12:05:44,516 cities_light INFO Importing countryInfo.txt 2023-03-14 12:05:46,621 cities_light WARNING Assuming local download is up to date for http://download.geonames.org/export/dump/admin1CodesASCII.txt 2023-03-14 12:05:46,622 cities_light INFO Forced import of admin1CodesASCII.txt because data do not seem to have installed successfuly yet, note that this is equivalent to --force-import-all. 2023-03-14 12:05:46,623 cities_light INFO Importing admin1CodesASCII.txt 2023-03-14 12:05:51,642 cities_light WARNING Assuming local download is up to date for http://download.geonames.org/export/dump/admin2Codes.txt 2023-03-14 12:05:51,642 cities_light INFO Forced import of admin2Codes.txt because data do not seem to have installed successfuly yet, note that this is equivalent to --force-import-all. File "/venv/lib/python3.8/site-packages/cities_light/management/commands/cities_light.py", line 177, in handle geonames = Geonames(url, force=force) File "/venv/lib/python3.8/site-packages/cities_light/geonames.py", line 21, in init self.downloaded = self.download( File "/venv/lib/python3.8/site-packages/cities_light/geonames.py", line 45, in download return downloader.download( File "/venv/lib/python3.8/site-packages/cities_light/downloader.py", line 28, in download if not self.needs_downloading(source, destination, force): File "/venv/lib/python3.8/site-packages/cities_light/downloader.py", line 59, in needs_downloading src_file = urlopen(source) File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python3.8/urllib/request.py", line 509, in open req = Request(fullurl, data) File "/usr/local/lib/python3.8/urllib/request.py", line 328, in init self.full_url = url File "/usr/local/lib/python3.8/urllib/request.py", line 354, in full_url self._parse() File "/usr/local/lib/python3.8/urllib/request.py", line 383, in _parse raise ValueError("unknown url type: %r" % self.full_url) ValueError: unknown url type: 'c' Sentry is attempting to send 0 pending error messages Waiting up to 2 seconds Press Ctrl-C to quit /jobs #

sekroots avatar Mar 14 '23 12:03 sekroots

Experiencing the same issue here

ProfoundPenguin avatar Sep 05 '23 14:09 ProfoundPenguin

Can you post all output @Habibullah-pythoner ? to check if this the same?

marianoeramirez avatar Sep 06 '23 12:09 marianoeramirez

Will be great to have versions of django and library.

marianoeramirez avatar Sep 06 '23 12:09 marianoeramirez