Open meteoDaniel opened 5 years ago
@meteoDaniel I guess you have a typo in your script
It should be gdal2tiles.generate_tiles
. You have a missing s, you used gdal2tile
which could be a different module.
@machakux thanks, but it was just a spelling mistake in this issue. Error still occures.
@meteoDaniel I couldn't reproduce this issue on my system.
May be you should make sure the package is properly installed (without errors) or you don't have other conflicting packages. You can try reinstalling on a fresh virtualenv.
For me gdal2tiles.generate_tiles
is recogized as a function (no AttributeError is raised).
I'm also experiencing this issue, importing it in the console seems to work, but using it with celery it says that it has no attribute generate_tiles
I was on GDAL version 2.3, downgraded to 2.2.3 and now its working
Does anybody know how to fix this?
I have the same problem. Someone know how to fix this?
I tried testing with multiple versions of GDAL (including GDAL 2.3.3) and I was unable to reproduce this issue, neither locally nor on Travis.
Basic tests performed are included in tests/
directory (https://github.com/tehamalab/gdal2tiles/blob/master/tests/test_generate_tiles.py) and passing Travis tests with multiple versions of GDAL can be seen at https://travis-ci.org/github/tehamalab/gdal2tiles
My guess is this issue is caused by errors during installation or a conficts in package names.
Unless someone can reproduce this issue on a fresh environment and provide a test script or expicit steps to reproduce this issue, I think this issue can be closed.
Don't know about the lower versions but on 3.1.4 (and probably up), GDAL has a gdal2tiles.py and this creates a conflict. In my case, it opts for
'/home/ashwin/miniconda3/envs/rdet/lib/python3.7/site-packages/GDAL-3.1.4-py3.7-linux-x86_64.egg-info/scripts/gdal2tiles.py'
instead of
/home/ashwin/miniconda3/envs/rdet/lib/python3.7/site-packages/gdal2tiles/gdal2tiles.py
The one from GDAL does not have a generate_tiles function.
It seems GDAL now includes gdal2tiles.py script in its pypi package as @ashnair1 mentioned. Perhaps this package should be renamed to avoid conflicts.
What are other options?
+1 for renaming this package to avoid import problems when GDAL is installed as well.
We are experiencing this too. Vote for renaming package.
Likewise, am experiencing the same issue.
Description
generate_tiles function is missing. I am using pycharm, the IDE is referencing to the right function but calling the script within a ipython script in virtual env it is missing.
What I Did