Closed girardea closed 3 years ago
Can you show the output of geopandas.show_versions()
and pyproj.show_versions()
?
The issue is an installation problem with PROJ / pyproj (it does not find the correct data files with the information about references systems it needs to reproject)
Thanks for the quick reply. Here they are:
>>> geopandas.show_versions()
Failed `CDLL(libgeos_c.so.1)`
Failed `CDLL(libgeos_c.so)`
SYSTEM INFO
-----------
python : 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
executable : /home/pgirardeau/.local/share/virtualenvs/c0082-WJZ3vvHu/bin/python
machine : Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29
GEOS, GDAL, PROJ INFO
---------------------
GEOS : None
GEOS lib : None
GDAL : 2.4.4
GDAL data dir: /home/pgirardeau/.local/share/virtualenvs/c0082-WJZ3vvHu/lib/python3.8/site-packages/fiona/gdal_data
PROJ : 7.2.0
PROJ data dir: /home/pgirardeau/.local/share/virtualenvs/c0082-WJZ3vvHu/lib/python3.8/site-packages/pyproj/proj_dir/share/proj
PYTHON DEPENDENCIES
-------------------
geopandas : 0.9.0
pandas : 1.2.3
fiona : 1.8.18
numpy : 1.20.1
shapely : 1.7.1
rtree : None
pyproj : 3.0.0.post1
matplotlib : 3.3.4
mapclassify: None
geopy : 2.1.0
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
geoalchemy2: None
pyarrow : 3.0.0
pygeos : None
>>> pyproj.show_versions()
pyproj info:
pyproj: 3.0.0.post1
PROJ: 7.2.0
data dir: /home/pgirardeau/.local/share/virtualenvs/c0082-WJZ3vvHu/lib/python3.8/site-packages/pyproj/proj_dir/share/proj
user_data_dir: /home/pgirardeau/.local/share/proj
System:
python: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
executable: /home/pgirardeau/.local/share/virtualenvs/c0082-WJZ3vvHu/bin/python
machine: Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29
Python deps:
pip: 20.1.1
setuptools: 46.4.0
Cython: None
Hi @jorisvandenbossche, did the outputs above give you a hint? Thanks!
I was experiencing exactly the same issue (on Linux). Managed to fix this by changing the order of imports, for whatever reason it breaks if you import contextily before geopandas. You should do instead:
import geopandas
import contextily as cx
import matplotlib.pyplot as plt
It works!! Thanks so much @sinia!
Le dim. 21 mars 2021 à 21:14, sinia @.***> a écrit :
I was experiencing exactly the same issue (on Linux). Managed to fix this by changing the order of imports, for whatever reason it breaks if you import contextily before geopandas. You should do instead:
import geopandas import contextily as cx import matplotlib.pyplot as plt
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/geopandas/contextily/issues/174#issuecomment-803652443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5SEVESHUSTENHGRCUB45LTEZHSXANCNFSM4YUQQUOA .
@girardea sorry for the late reply here, but good to here there is a workaround
This seems to be a similar issue as what was reported recently here https://github.com/Toblerity/Fiona/issues/1007 about needing to import fiona before rasterio, although there the order is actually the other way around ...
Thanks for your reply! Weird indeed but works out in the end!
Le mer. 31 mars 2021 à 14:26, Joris Van den Bossche < @.***> a écrit :
@girardea https://github.com/girardea sorry for the late reply here, but good to here there is a workaround
This seems to be a similar issue as what was reported recently here Toblerity/Fiona#1007 https://github.com/Toblerity/Fiona/issues/1007 about needing to import fiona before rasterio, although there the order is actually the other way around ...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geopandas/contextily/issues/174#issuecomment-811028138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5SEVG3YHTNXCZZMGVBECTTGMIFTANCNFSM4YUQQUOA .
A similar error message popped up for me after running a script which worked perfectly fine a few weeks back. As I was totally stumped, I restarted the computer and it worked. Beats me...
Here my error message:
CRSError: The EPSG code is unknown. PROJ: proj_create_from_database:
SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code,
geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code,
area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs
WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name
Hi there!
Thanks for all the good work on
contextily
!When running this simple script (from the docs),
I get the following error:
From digging on the web, it seems this is not the only project when this happens, but I cannot find a way to solve it here anyway.
Can you help?
I am running Python3.8 on Ubuntu within a Windows Terminal (WSL2). I installed
contextily
in my virtual environment usingpipenv install contextily
.