Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge_public_transport_FR_sillages: city_name no longer in data source #2075

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

Famlam
Copy link
Collaborator

@Famlam Famlam commented Nov 17, 2023

Field city_name has been removed from the data source. (In addition, I find it odd to add an address - consisting of only a city - to a bus stop, but maybe that's a local custom).

As this data source has English column headers I could check this myself :)


2023-11-13 03:27:11 france_provence_alpes_cote_d_azur_alpes_maritimes : merge_public_transport_FR_sillages
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
2023-11-13 03:27:12   run osmosis all analyser Analyser_Merge_Public_Transport_FR_sillages
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
2023-11-13 03:27:12   Analyser_Merge.py:1243 sql
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
2023-11-13 03:27:12   Analyser_Merge.py:831 sql
2023-11-13 03:27:12   Analyser_Merge.py:843 sql
2023-11-13 03:27:12   Load raw data into database
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
['agency.txt', 'stops.txt', 'routes.txt', 'trips.txt', 'trips_extensions.txt', 'stop_times.txt', 'calendar.txt', 'calendar_dates.txt', 'shapes.txt']
2023-11-13 03:27:12   Analyser_Merge.py:861 sql
2023-11-13 03:27:12   Analyser_Merge.py:866 sql
2023-11-13 03:27:12   Convert raw data to tags
2023-11-13 03:27:12   Analyser_Merge.py:872 sql
2023-11-13 03:27:12   Analyser_Merge.py:873 sql
2023-11-13 03:27:12   Analyser_Merge.py:906 sql
2023-11-13 03:27:12   error: res=[['6.9264904', '43.6629932'], 'STP-0001', '0001', '11 NOVEMBRE', None, '43.6629932', '6.9264904', None, None, '0', 'STA-STP-0001', None, None]
2023-11-13 03:27:12   error: ret=None
2023-11-13 03:27:12   error: error on analyse merge_public_transport_FR_sillages...
2023-11-13 03:27:12     Traceback (most recent call last):
2023-11-13 03:27:12       File "/data/project/osmose/backend/./osmose_run.py", line 275, in execc
2023-11-13 03:27:12         analyser_obj.analyser()
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Osmosis.py", line 290, in analyser
2023-11-13 03:27:12         self.analyser_osmosis_common()
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Merge.py", line 1401, in analyser_osmosis_common
2023-11-13 03:27:12         table = super().analyser_osmosis_common()
2023-11-13 03:27:12                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Merge.py", line 1245, in analyser_osmosis_common
2023-11-13 03:27:12         table = self.load.run(self, self.conflate, self.config.db_user, self.__class__.__name__.lower()[15:], self.analyser_version())
2023-11-13 03:27:12                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Merge.py", line 1003, in run
2023-11-13 03:27:12         return super().run(osmosis, conflate, db_schema, default_table_base_name, version)
2023-11-13 03:27:12                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Merge.py", line 906, in run
2023-11-13 03:27:12         osmosis.run0((sql01_ref if conflate.osmRef != "NULL" else sql01_geo).format(table = table, geom = self.geom, validationGeomSQL = self.validationGeomSQL, where = Select.where_attributes(self.select), distinct = distinct, order_by = order_by), insertOfficial)
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Osmosis.py", line 557, in run0
2023-11-13 03:27:12         self.run00(sql, callback)
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Osmosis.py", line 548, in run00
2023-11-13 03:27:12         ret = callback(res)
2023-11-13 03:27:12               ^^^^^^^^^^^^^
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Merge.py", line 888, in insertOfficial
2023-11-13 03:27:12         tags = conflate.mapping.tagFactory(res)
2023-11-13 03:27:12                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Merge.py", line 1140, in tagFactory
2023-11-13 03:27:12         tags = self.tagFactoryGroup(res, self.static1, self.mapping1)
2023-11-13 03:27:12                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/Analyser_Merge.py", line 1131, in tagFactoryGroup
2023-11-13 03:27:12         r = colomn(res)
2023-11-13 03:27:12             ^^^^^^^^^^^
2023-11-13 03:27:12       File "/data/project/osmose/backend/analysers/analyser_merge_public_transport_FR_sillages.py", line 60, in <lambda>
2023-11-13 03:27:12         "addr:city": lambda res: res["city_name"].title(),
2023-11-13 03:27:12                                  ~~~^^^^^^^^^^^^^
2023-11-13 03:27:12     KeyError: 'city_name'

@frodrigo
Copy link
Member

Ok. Thank you addr:city on bus stop was ugly anyway.

@frodrigo frodrigo merged commit 98bb2de into osm-fr:dev Nov 18, 2023
3 checks passed
@Famlam Famlam deleted the fix-merge-sillages branch November 18, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants