Giter Site home page Giter Site logo

jageocoder-converter's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

jageocoder-converter's Issues

辞書生成の際に浜松市**区(2024.1.1から施行)の処理ができずクラッシュする

こんにちは、辞書の生成を試したところ、 郵便局データの処理中にクラッシュする現象に遭遇しましたので報告させていただきます。
PostCoder の Converter の処理で、市区町村コード 22138 (浜松市**区、2024.1.1から施行)に遭遇し、エラーとなっているようです。

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/kamataryo/Desktop/rits/jageocoder-converter/jageocoder_converter/__main__.py", line 109, in <module>
    db_dir = jageocoder_converter.convert(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kamataryo/Desktop/rits/jageocoder-converter/jageocoder_converter/__init__.py", line 197, in convert
    __prepare_postcoder(os.path.join(download_dir, 'japanpost'))
  File "/Users/kamataryo/Desktop/rits/jageocoder-converter/jageocoder_converter/__init__.py", line 43, in __prepare_postcoder
    postcoder = PostCoder.get_instance(directory)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kamataryo/Desktop/rits/jageocoder-converter/jageocoder_converter/postcoder.py", line 264, in get_instance
    cls.postcoder.load_file()
  File "/Users/kamataryo/Desktop/rits/jageocoder-converter/jageocoder_converter/postcoder.py", line 81, in load_file
    x[1] for x in self.jiscodes[citycode]])
                  ~~~~~~~~~~~~~^^^^^^^^^^
KeyError: '22138'

chiban.csvがアクセスダウンロードできない

お世話になっております。

内容

jageocoder_converterを利用して、辞書データを作成した際にchiban.csvデータがダウンロードできず失敗してしまいます。
実際に以下URLにアクセスしてみると、アクセスできない(ファイルが存在しない)のですがchiban.csvデータは利用不可になったのでしょうか?

https://www.info-proto.com/static/jageocoder/chiban/2022/13_chiban.csv.gz

--no-chibanオプションを付与すると問題なく動きます。

コマンド出力結果

$ python -m jageocoder_converter 13
「歴史的行政区域データセットβ版地名辞書」をダウンロードします。
利用条件等は https://geonlp.ex.nii.ac.jp/dictionary/geoshape-city/ を確認してください。
 (了承する場合は Y, 中止する場合は N を入力)Y

「大字・町丁目レベル位置参照情報」をダウンロードします。
https://nlftp.mlit.go.jp/ksj/other/agreement.html の利用規約を必ず確認してください。
 (了承する場合は Y, 中止する場合は N を入力)Y

「街区レベル位置参照情報」をダウンロードします。
https://nlftp.mlit.go.jp/ksj/other/agreement.html の利用規約を必ず確認してください。
 (了承する場合は Y, 中止する場合は N を入力)Y

「Geolonia 住所データ」をダウンロードします。
https://geolonia.github.io/japanese-addresses/ の説明およびライセンスを必ず確認してください。
 (了承する場合は Y, 中止する場合は N を入力)Y

「電子国土基本図(地名情報)「住居表示住所」をダウンロードします。
注意事項や利用条件についてはhttps://www.gsi.go.jp/kihonjohochousa/jukyo_jusho.htmlを必ず確認してください。
 (了承する場合は Y, 中止する場合は N を入力)Y

「アドレス・ベース・レジストリ」をダウンロードします。
https://www.digital.go.jp/policies/base_registry_address_tos/ の利用規約を必ず確認してください。
 (了承する場合は Y, 中止する場合は N を入力)Y

「法務省登記所備付地図データ」をダウンロードします。
利用条件等は https://www.geospatial.jp/ckan/dataset/houmusyouchizu-2022-1-1/resource/737ca982-2217-4721-8be4-eb5bf9cb1899 を確認してください。
 (了承する場合は Y, 中止する場合は N を入力)Y
INFO:jageocoder_converter:191:データファイルをダウンロードします。
Traceback (most recent call last):
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/tomoya.kinsho/workspace/jageocoder-converter/jageocoder_converter/__main__.py", line 109, in <module>
    db_dir = jageocoder_converter.convert(**kwargs)
  File "/Users/tomoya.kinsho/workspace/jageocoder-converter/jageocoder_converter/__init__.py", line 193, in convert
    converter.download_files()
  File "/Users/tomoya.kinsho/workspace/jageocoder-converter/jageocoder_converter/chiban_converter.py", line 62, in download_files
    self.download(
  File "/Users/tomoya.kinsho/workspace/jageocoder-converter/jageocoder_converter/base_converter.py", line 338, in download
    local_filename, headers = urllib.request.urlretrieve(url, filename)
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 241, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Users/tomoya.kinsho/.pyenv/versions/3.10.5/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

よろしくお願いいたします。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.