Tryton - Issues

 

Message54624

Author Marina
Recipients
Date 2019-12-23.15:39:26
Content
> It seems that the url has changed, the new url is 'http://download.geonames.org/export/dump/'

FetchingTraceback (most recent call last):
  File "./modules/country/scripts/import_zip.py", line 122, in <module>
    run()
  File "./modules/country/scripts/import_zip.py", line 118, in run
    main(args.database, args.codes, args.config_file)
  File "./modules/country/scripts/import_zip.py", line 97, in main
    do_import(codes)
  File "./modules/country/scripts/import_zip.py", line 105, in do_import
    import_(fetch(code))
  File "./modules/country/scripts/import_zip.py", line 40, in fetch
    responce = urlopen(url)
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found


> The structure of the import file also seems to have changed.

Traceback (most recent call last):
  File "./modules/country/scripts/import_zip.py", line 122, in <module>
    run()
  File "./modules/country/scripts/import_zip.py", line 118, in run
    main(args.database, args.codes, args.config_file)
  File "./modules/country/scripts/import_zip.py", line 97, in main
    do_import(codes)
  File "./modules/country/scripts/import_zip.py", line 105, in do_import
    import_(fetch(code))
  File "./modules/country/scripts/import_zip.py", line 83, in import_
    country = get_country(row['country'])
  File "./modules/country/scripts/import_zip.py", line 57, in get_country
    country, = Country.find([('code', '=', code)])
ValueError: not enough values to unpack (expected 1, got 0)
History
Date User Action Args
2019-12-23 15:39:26Marinasetmessageid: <1577111966.89.0.236295327423.issue8952@tryton.org>
2019-12-23 15:39:26Marinalinkissue8952 messages
2019-12-23 15:39:26Marinacreate

Showing 10 items. Show all history (warning: this could be VERY long)