tilezen / vector-datasource

Tilezen vector tile service - OpenStreetMap data in several formats
https://www.nextzen.org/
Other
505 stars 118 forks source link

ImportError: No module named vectordatasource.meta.python #1431

Closed pnorman closed 5 years ago

pnorman commented 6 years ago

When running ./perform-sql-updates.sh -d osm I get

Generating functions from YAML...
~/osm/tilezen/vector-datasource/vectordatasource/meta ~/osm/tilezen/vector-datasource/data
Traceback (most recent call last):
  File "sql.py", line 1, in <module>
    from vectordatasource.meta.python import parse_layers, output_kind, \
ImportError: No module named vectordatasource.meta.python
nvkelso commented 6 years ago

Are you using latest tagged versions or all repos?

On Nov 17, 2017, at 15:39, Paul Norman notifications@github.com wrote:

When running ./perform-sql-updates.sh -d osm I get

Generating functions from YAML... ~/osm/tilezen/vector-datasource/vectordatasource/meta ~/osm/tilezen/vector-datasource/data Traceback (most recent call last): File "sql.py", line 1, in from vectordatasource.meta.python import parse_layers, output_kind, \ ImportError: No module named vectordatasource.meta.python — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

pnorman commented 6 years ago

I'm still in step two of the instructions, so the only repo yet involved is vector-datasource.

The steps run so far, aside from apt stuff I already have are

# in vector-datasource directory
createdb osm
psql -d osm -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore'
osm2pgsql --slim --hstore-all -C 1024 -S vector-datasource/osm2pgsql.style -d osm
osm2pgsql --slim -C 4000 -S osm2pgsql.style -j ~/osm/planet/new-york_new-york.osm.pbf -d osm
cd data
python bootstrap.py
make -f Makefile-import-data
./import-shapefiles.sh | psql -d osm
./perform-sql-updates.sh -d osm
iandees commented 6 years ago

I remember running into this as well when putting together the Dockerfile. I'm just heading to bed so I can't look into it right now, but it might be helpful to take a peek at my Dockerfile and "bootstrap" script. The bootstrap script follows exactly what you've got so far, but there was some Python dependency installation I had to do in the Dockerfile to make stuff work on a bare Ubuntu Docker image.

pnorman commented 6 years ago

The Dockerfile doesn't follow the instructions, running pip install -r requirements.txt before running the commands. So it looks like the install instructions need some re-ordering to get tileserver installed before loading the database.

It's not immediately obvious to me why there should be a dependency on tileserver or tilequeue for a data load, but it seems clear there is one.

pnorman commented 6 years ago

I've rearranged the instructions to install vector-datasource python code before loading data, and it fixes it. It could use a review, and I'm following up on fixing some of the paths later on in the file to reflect the changes.

nvkelso commented 6 years ago

Thanks!

On Nov 19, 2017, at 12:50, Paul Norman notifications@github.com wrote:

I've rearranged the instructions to install vector-datasource python code before loading data, and it fixes it. It could use a review, and I'm following up on fixing some of the paths later on in the file to reflect the changes.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

SergeiMinaev commented 6 years ago

I solved it by running python setup.py install from ./vector-datasource dir. It just installed vectordatasource module to my virtualenv.

phucdv commented 3 years ago

I am having trouble installing the program. Can you help me, give me a vector tile installation process?

nvkelso commented 3 years ago

Docs: https://github.com/tilezen/vector-datasource/wiki/Mapzen-Vector-Tile-Service

phucdv commented 3 years ago

The document has a few links where the link has died. Can you help me in some places. Firstly cd ../tileserver cp config.yaml.sample config.yaml

update configuration as necessary

edit config.yaml I can't find the tileserver file Secondly wget https://www.dropbox.com/s/xh4gjdox9lgmxzh/contours.zip?dl=1 unzip contours.zip?dl=1 psql -d osm -f contours.sql This part the link has been lost, can you help me. Thanks !

phucdv commented 3 years ago

Can you give me something to communicate with you easily. Such as FB, Ins, email, ....

nvkelso commented 3 years ago

https://gitter.im/tilezen/tilezen-chat