Exception hides dependency isssue
See original GitHub issueHi,
On my first attempt to setup django-rest-framework-gis, I stumble upon an exception thrown here:
So I put together a small example:
>>> import json
>>> t = json.dumps({ "type": "Point", "coordinates":[45.563237,-73.582419]})
>>> t
'{"type": "Point", "coordinates": [45.563237, -73.582419]}'
>>> GEOSGeometry(t)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/srv/app/.virtualenvs/env/local/lib/python2.7/site-packages/django/contrib/gis/geos/geometry.py", line 64, in __init__
raise ValueError('Initializing geometry from JSON input requires GDAL.')
which shows that the underlying issue was related to a missing library (python-gdal).
I think it’s Ok to return a ValidationError but I think it might make sense to also add the message from the captured exception so users know what went wrong.
What do you think?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Stop hiding exception raised by composer #6289 - GitHub
I have searched the existing issues Code improvement description While debugging a ... Stop hiding exception raised by composer #6289.
Read more >What are hidden dependencies? - Stack Overflow
"A visible dependency is a dependency that developers can see from a class's interface. If a dependency cannot be seen from the class's ......
Read more >Maven – Optional Dependencies and Dependency Exclusions
Exclusions are set on a specific dependency in your POM, and are targeted at a specific groupId and artifactId. When you build your...
Read more >7 Common Mistakes You Should Avoid When Handling Java ...
Handling an exception in Java is one of the most common but not necessarily one of the easiest tasks. Here are several common...
Read more >Handling Resolution Errors - Prism Library
Some common errors developers run into is a Service that was not registered or invalid XAML that generates an Exception when the View...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. Will send you a PR then 😉
Please am new in django I spend days trying to get pass this error to no avail when trying to migrate after installing geodjango
ValueError: String input unrecognized as WKT EWKT, and HEXEWKB.