Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError from missign romaji on a certain postcode #8

Closed
rtpg opened this issue Jan 21, 2021 · 3 comments
Closed

TypeError from missign romaji on a certain postcode #8

rtpg opened this issue Jan 21, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@rtpg
Copy link

rtpg commented Jan 21, 2021

>>> posuto.get("1057529")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../lib/python3.8/site-packages/posuto/posuto.py", line 57, in get
    out = PostalCode(**base)
TypeError: __new__() missing 3 required positional arguments: 'prefecture_romaji', 'city_romaji', and 'neighborhood_romaji'

I'm not sure clear on how this database gets built, is this perhaps the effect of some data getting carried over from an older implementation of this system?

@polm
Copy link
Owner

polm commented Jan 21, 2021

Huh, that's the same error as #6, but with a different code. I thought I took steps to prevent that from happening again but I guess it didn't work. It also seems to affect all codes in that building...

I'll look at making a more general fix for this. I've been considering dropping romaji from the library entirely, so this might be a good reason to do that too.

@polm
Copy link
Owner

polm commented Jan 21, 2021

Oh, and to clarify, the issue is that the romaji data comes from a different CSV than the other postal code data. The romaji data is updated less frequently, maybe twice a year, and is frequently out of sync with the main data. Besides that it's low quality.

@polm polm added the bug Something isn't working label Jan 29, 2021
@polm
Copy link
Owner

polm commented Jan 29, 2021

I removed romaji support in the most recent release, so this issue is fixed and should not recur.

@polm polm closed this as completed Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants