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

cannot import name 'asPolygon' from 'shapely.geometry' #4

Open
p91g opened this issue Nov 25, 2023 · 2 comments · May be fixed by #6
Open

cannot import name 'asPolygon' from 'shapely.geometry' #4

p91g opened this issue Nov 25, 2023 · 2 comments · May be fixed by #6

Comments

@p91g
Copy link

p91g commented Nov 25, 2023

Hi there,

I have the latest version of shapely and it doesn't seem to recognise 'asPolygon'. Has this been depreciated from shapely?

import spacv
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\x\Documents\spopt_venv\lib\site-packages\spacv_init_.py", line 5, in
from .spacv import *
File "C:\Users\x\Documents\spopt_venv\lib\site-packages\spacv\spacv.py", line 7, in
from .grid_builder import construct_blocks, assign_pt_to_grid
File "C:\Users\x\Documents\spopt_venv\lib\site-packages\spacv\grid_builder.py", line 3, in
from shapely.geometry import Polygon, asPolygon
ImportError: cannot import name 'asPolygon' from 'shapely.geometry' (C:\Users\x\Documents\spopt_venv\lib\site-packages\shapely\geometry_init_.py)

Any recommendations would be greatly appreciated :)

P

@aszani
Copy link

aszani commented Dec 14, 2023

I encountered an error as well. If you have a solution, please let me know how you resolved it. Thank you

@arkanoid87
Copy link

arkanoid87 commented Sep 16, 2024

I've downloaded the PR #6 via spacv @ git+https://github.com/dluks/spacv@master (spacv==0.0.22) in my requirements.txt but I keep getting

ImportError: cannot import name 'asPolygon' from 'shapely.geometry'

EDIT: do pip uninstall spacv before reinstalling with pip install git+https://github.com/dluks/spacv@master

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.

3 participants