[SOLVED] Module issue: module 'wradlib' has no attribute 'georef'

Hi guys,

I wanted to try out wradlib a bit but get an error when trying to use submodule georef from wradlib in my python programm, i.e. using function wrl.georef.epsg_to_osr(3857):

“Module issue: module ‘wradlib’ has no attribute ‘georef’”.
or when trying to import it like “import wradlib.georef as georef” i get “No module named ‘wradlib.georef’”.

My installation of wradlib was according to the docs with (mini)conda.
I have activated the conda env and then tried to run a python script which uses wradlib.
Python 3.12
wradlib 2.0.3

Error in konsole:

Know comes the even more confusing part for me, when using python interpreter directly via CLI, the module is found?

python3
Python 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) [GCC 12.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import wradlib.georef
wradlib.georef;
<module ‘wradlib.georef’ from ‘/home/miniconda3/envs/wradlib/lib/python3.12/site-packages/wradlib/georef/init.py’>

Has anyone an idea whats the issue?

SOLUTION:

I found it by myself-dont repeat.
I have named a module for my script “wradlib”, too, so there where naming conflicts then. Not so smart :slight_smile:

Regards

1 Like