Comments (6)
Hi @lucaslcode
Thanks for the report and sorry for the inconvenience.
Could you tell me what is the type of your Polygon
object please? And if you can provide a Minimal Working Example to reproduce this error it would be nice.
from geoalchemy2.
Isn't it a Shapely
object? If it is you should create your WKTElement
by passing the wkt form of the geometry object, not the raw object. For example:
obj = shapely.wkt.loads("POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))")
elem = WKTElement(obj.wkt)
from geoalchemy2.
Thank you, it is indeed a shapely polygon. Odd that this line was working before!
from geoalchemy2.
Yeah previously it could accept anything that can be cast to a str object while now it must be a str
object. Nevertheless, we could explicitly try to cast it to str
in the WKTElement
constructor to keep the same behavior as before, which I never considered but can be convenient.
from geoalchemy2.
I ran into this as well due to some buggy code that finally broke with this release, an issue that I think would have been easily spotted in the CI pipeline if this package had type annotations. Is there any interest in adding type annotations into this project?
from geoalchemy2.
Sure, that would be nice!
Does anyone have some time to add it? It will be hard for me to find time for this before several weeks. For now I'm just going to open an issue.
from geoalchemy2.
Related Issues (20)
- How do I install it in an offline environment? HOT 4
- Unit tests fail on s390x (big-endian) HOT 10
- "no such table: main.idx_{table}_{col}" Exception when writing Spatialite HOT 6
- Performance improvement suggestions for load_spatialite HOT 2
- Add type annotations
- Multipolygon with one polygon is forced to be Polygon HOT 2
- Fix MySQL dialect HOT 2
- AtttributeError: 'Nonetype' object has no attribute 'replace' HOT 7
- Add support for Mapped and mapped_column from sqlalchemy 2 HOT 3
- bigquery insert error with geometry field HOT 3
- WKBElement in postgres CASE WHEN doesn't work HOT 9
- mypy: Skipping analyzing "geoalchemy2.functions": module is installed, but missing library stubs or py.typed marker [import] HOT 7
- [Feature request] Support Python3.12 HOT 4
- [How to use] GeoAlchemy ORM with MySQL HOT 6
- [Bug report] When using MariaDB, `add` generates wrong SQL HOT 9
- using func.ST_DWithin outputs error stating "No function matches the given name and argument types." HOT 8
- Assistanze in using 3D Geometries HOT 4
- [How to use] I'm not able to use ST_* functions during insertion HOT 4
- [Feature request] Add compatibility with MSSQL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoalchemy2.