Comments (9)
I had the same problem and it turned out that pyosmium-get-changes
uses /usr/bin/python3
while Python scripts supplied with Nominatim refer to /usr/bin/python
which in ubuntu:disco
image is Python 2.7. Also, user postgres
have no write permission to /app/src/build.
Here's the patch for Dockerfile I've used to workaround it.
--- 3.3/Dockerfile.orig 2019-05-28 13:52:56.347074000 +0200
+++ 3.3/Dockerfile 2019-06-05 16:19:29.442759114 +0200
@@ -40,6 +40,8 @@
# Load initial data
RUN curl http://www.nominatim.org/data/country_grid.sql.gz > /app/src/data/country_osm_grid.sql.gz
+RUN sed -i -e 's|bin/python|bin/python3|' /app/src/utils/*.py
+RUN chmod o=rwx /app/src/build
EXPOSE 5432
EXPOSE 8080
You can apply it with patch -p0 < patch-Docker
.
from nominatim-docker.
Same issue
from nominatim-docker.
The issue here seems to be that the Pyosmium binary cannot be found where the update script is looking for it. Though it should be installed, according to the Dockerfile.
Run the command
whereis pyosmium-get-changes
inside the container and see what it shows.
Now go into your locals.php
file and make sure the line
@define('CONST_Pyosmium_Binary', '/usr/local/bin/pyosmium-get-changes');
shows the correct path. I remember having that problem some time ago.
I remember having that problem some time ago and that was the reason why.
Edit:
I just tried it and my solution doesn't seem to work at all. It must have something to do with the fact that osmium is now installed without the --user argument.
from nominatim-docker.
I have the same issue. I have two docker container with postgres and apache but when I trying update db using command docker exec -it nominatim sudo -u postgres ./src/build/utils/update.php --import-osmosis-all
I got
Currently at sequence 967 (04/07/2019 20:08:23) - 1 indexed
/usr/local/bin/pyosmium-get-changes --server http://download.geofabrik.de/europe/russia-european-part-updates -o /app/src/build/osmosischange.osc -s 30 -I 967
Traceback (most recent call last):
File "/usr/local/bin/pyosmium-get-changes", line 243, in <module>
exit(main(sys.argv[1:]))
File "/usr/local/bin/pyosmium-get-changes", line 224, in main
outhandler = WriteHandler(options.outfile)
RuntimeError: Open failed for '/app/src/build/osmosischange.osc': Permission denied
CONST_Pyosmium_Binary have currect path. Someone can help me with this issue?
from nominatim-docker.
@Wilfli you can use the patch I've supplied above. There's also a pull request #71 with that change.
from nominatim-docker.
Yes it work. Thanks
from nominatim-docker.
I had the same problem and it turned out that
pyosmium-get-changes
uses/usr/bin/python3
while Python scripts supplied with Nominatim refer to/usr/bin/python
which inubuntu:disco
image is Python 2.7. Also, userpostgres
have no write permission to /app/src/build.Here's the patch for Dockerfile I've used to workaround it.
--- 3.3/Dockerfile.orig 2019-05-28 13:52:56.347074000 +0200 +++ 3.3/Dockerfile 2019-06-05 16:19:29.442759114 +0200 @@ -40,6 +40,8 @@ # Load initial data RUN curl http://www.nominatim.org/data/country_grid.sql.gz > /app/src/data/country_osm_grid.sql.gz +RUN sed -i -e 's|bin/python|bin/python3|' /app/src/utils/*.py +RUN chmod o=rwx /app/src/build EXPOSE 5432 EXPOSE 8080
You can apply it with
patch -p0 < patch-Docker
.
I think better way is to use update-alternatives tool to change default version of python.
Like update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
from nominatim-docker.
It seems that the PR #71 from @therek has been merged, but it only provides a fix for version 3.3 and not for 3.4 version that has the same problem.
I tested the solution from @theHellDog on the 3.4 version and it worked for me:
# Fix python default version
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 3
RUN update-alternatives --install /usr/bin/python python /usr/bin/python2 2
from nominatim-docker.
@ErwanTremiot where exactly do you see the problem? I have built 3.4 with no changes regarding that issue and everything works as expected.
from nominatim-docker.
Related Issues (20)
- Crash while importing europe data HOT 4
- Poor response time after loading the docker HOT 1
- [TIP] Adding Wikipedia/Wikidata Rankings after Initial Import
- The configuration of "nominatim import" can not transfer to osm2pgsql.osm2pgsql execut slow. HOT 2
- Geometry Mismatch on World import in placex table HOT 5
- remote postgres host parse error HOT 3
- Import Style Customization HOT 4
- OSM import fails due to URL corruption HOT 2
- Replication logs not generating
- Error After Installation - How to troubleshoot HOT 11
- api request format HOT 1
- 漏洞 HOT 10
- External database gets recreated upon pod restart HOT 5
- nominatim reverse cli call with external database HOT 1
- Parallelize GitHub CI to cut down on overall timing HOT 1
- Cannot shutdown container if replication is not active
- Setup external PostgreSQL from dump and connect docker nominatim to it HOT 1
- Existing Full Planet GeoServer OSM HOT 4
- Replication is not updating
- psycopg2.OperationalError: server closed the connection unexpectedly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nominatim-docker.