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

ValueError due to shapely update #60

Open
ytreister opened this issue Jan 13, 2023 · 5 comments
Open

ValueError due to shapely update #60

ytreister opened this issue Jan 13, 2023 · 5 comments

Comments

@ytreister
Copy link

shapely recently updated with a breaking change. I think this occured with version 2.0.0 of shapely

tz = tzwhere.tzwhere()
File "/usr/local/lib/python3.10/site-packages/tzwhere/tzwhere.py", line 62, in __init__
self.timezoneNamesToPolygons[tzname] = WRAP(polys)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (1, 2) + inhomogeneous part.
@ytreister
Copy link
Author

So I am actually not sure the issue is due to shapely, I was able to fix this by setting in my requirements.txt:
numpy==1.23.5
When it ran with version 1.24.0 it gave that error.

@tonal
Copy link

tonal commented Feb 11, 2023

After downgrade numpy to v1.23.5 show warning:

.../lib/python3.10/site-packages/tzwhere/tzwhere.py:62: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
  self.timezoneNamesToPolygons[tzname] = WRAP(polys)

@riyadparvez
Copy link

Is there any update on this? This bug is breaking our production.

@pegler
Copy link
Owner

pegler commented May 19, 2023

I haven't been maintaining this package for many years, but I'd be happy to review and merge pull requests.

@romanwerpachowski
Copy link

What about #62?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants