Oslandia / py3dtiles

:warning: Project migrated to : https://gitlab.com/py3dtiles/py3dtiles :warning:
https://py3dtiles.org
Other
215 stars 76 forks source link

Failure of some examples that are presented on the Pypi documentation page #81

Closed EricBoix closed 4 years ago

EricBoix commented 4 years ago

How to reproduce the problem

I tried to reproduce the b3dm related example code of the py3dtiles Pypi documentation page.

You first install py3dtiles from the sources which goes

git clone https://github.com/Oslandia/py3dtiles
...
python setup.py install

and then (refer to "How to read a .b3dm file" section) try to run a python script starting with

from py3dtiles import TileReader
from py3dtiles import B3dm
...

This will fail with a python error message of the form

ImportError: cannot import name 'TileReader' from 'py3dtiles'

Analysis of the problem

It seems that the Pypi documentation was correct prior to py3dtiles version incremental. Indeed the git clone https://github.com/Oslandia/py3dtiles will (as of 13 may 2020) checkout version 2.0.0 of py3dTiles, as opposed to version 1.0.2.

And alas the py3dtiles.TileReader, that existed in py3dtiles version 1.0.2 has disappeared (renamed?) from version 2.0.0.

Possible solution

The version of the documentation that is pushed on Pypi should be aligned with the py3dTiles version number. Hence the git clone instruction should (for this Pypi version 1.0.2) probably go:

git clone https://github.com/Oslandia/py3dtiles
cd py3dtiles
git checkout 8efa053986ad.      #  <--- SHA-1 of version 1.0.2
...

Just my 2cts.

autra commented 4 years ago

Thanks @EricBoix I'll have a look. We have to publish 2.0 on pypi.

delhomer commented 4 years ago

Moved to https://gitlab.com/Oslandia/py3dtiles/-/issues/81