JakobMiksch created an issue (osm2pgsql-dev/osm2pgsql#2468)
related to #2464
## What version of osm2pgsql are you using?
```
osm2pgsql version 2.1.1
Build: None
Compiled using the following library versions:
Libosmium 2.22.0
Proj 9.6.0
Lua 5.3.6
```
## What operating system and PostgreSQL/PostGIS version are you using?
PostgreSQL 17 and PostGIS from Debian 13 stable packages
## Tell us something about your system
not relevant
## What did you do exactly?
- i run standalone `osm2pgsql-test-style` WITHOUT `osm2pgsql-replication` next
to it
- my command: `./osm2pgsql-test-style trees.feature`
content of `trees.feature`:
```gherkin
Feature: Test import of trees
Scenario: An OSM tree node will be imported
Given the OSM data
"""
n12 Tnatural=tree,name=Old%20%Oak x34.6 y56.374
n20 Thighway=bus_stop x34.66 y56.377
"""
Given the style file 'trees.lua'
When running osm2pgsql flex
Then table trees contains exactly
| node_id | name |
| 12 | Old Oak |
```
references style file `trees.lua`:
```lua
local trees = osm2pgsql.define_node_table('trees', {
{ column = 'name', type = 'text' },
{ column = 'geom', type = 'point', srid = 4326 }
})
function osm2pgsql.process_node(object)
if object.tags.natural == 'tree' then
trees:insert {
name = object.tags.name,
geom = object:as_point()
}
end
end
```
## What did you expect to happen?
I expected that the tests pass.
## What did happen instead?
The tests failed, because the testing itself had an error with this message:
```
HOOK-ERROR in before_scenario: AttributeError: 'NoneType' object has no
attribute 'ReplicationServer' and no __dict__ for setting new attributes
```
## What did you do to try analyzing the problem?
I fixed it locally by commenting these lines:
https://github.com/osm2pgsql-dev/osm2pgsql/blob/8b7d01a2ba89884ea151f5b53843a291e929de03/scripts/osm2pgsql-test-style#L167
https://github.com/osm2pgsql-dev/osm2pgsql/blob/8b7d01a2ba89884ea151f5b53843a291e929de03/scripts/osm2pgsql-test-style#L175
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/issues/2468
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/issues/[email protected]>_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving