[Tile-serving] [openstreetmap/osm2pgsql] osm2pgsql-replication seems not to use env variable PGSERVICE (Issue #1800)
Lars Lingner
notifications at github.com
Wed Oct 26 21:09:05 UTC 2022
<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. -->
## What version of osm2pgsql are you using?
```
osm2pgsql --version
2022-10-26 20:57:12 osm2pgsql version 1.7.0
Build: None
Compiled using the following library versions:
Libosmium 2.18.0
Proj [API 6] 9.1.0
Lua 5.3.6
```
## What operating system and PostgreSQL/PostGIS version are you using?
`Debian GNU/Linux bookworm/sid`
<!-- Also what Linux distribution if applicable, OS version? -->
## Tell us something about your system
osm2pgsql is being used in a docker setup.
## What did you do exactly?
<!-- Please provide the command(s) you used including all options etc. Include
links to input files. -->
I created a .pg_service.conf file whith following configuration:
```
[osmdb]
host=<db_host>
port=<db_port>
dbname=<db_name>
user=<db_user>
password=<db_password>
```
and used the following commands:
```
export PGSERVICE=osmdb
osm2pgsql-replication init --server https://planet.osm.org/replication/minute/
```
## What did you expect to happen?
The init process should start
## What did happen instead?
The following traceback:
```
osm2pgsql init
Traceback (most recent call last):
File "/usr/bin/osm2pgsql-replication", line 535, in <module>
sys.exit(main())
File "/usr/bin/osm2pgsql-replication", line 527, in main
conn = connect(args)
File "/usr/bin/osm2pgsql-replication", line 79, in connect
if any(part in args.database for part in ['=', '://']):
File "/usr/bin/osm2pgsql-replication", line 79, in <genexpr>
if any(part in args.database for part in ['=', '://']):
TypeError: argument of type 'NoneType' is not iterable
```
<!-- Please describe what happened and why you think this is wrong. Please include
(or link to, if it is too verbose) the log output. -->
The init is working if I supply the command line parameters -d -H -U -P
osm2pgsql instead is respecting the env variable PGSERVICE.
## What did you do to try analyzing the problem?
I compared the what happend when I use env variable and command line parameters
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1800
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/issues/1800 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20221026/3dd838d1/attachment.htm>
More information about the Tile-serving
mailing list