comaps/subways
17
7
Fork
You've already forked subways
6

process_subways.sh doesn't fail on errors #96

Open
opened 2026年07月01日 04:38:18 +02:00 by pastk · 3 comments
Owner
Copy link

This subway run had issues https://codeberg.org/comaps/comaps/actions/runs/19731/jobs/1/attempt/1 and https://mapgen-fi-1.comaps.app/subway/validator/index.html hasn't been produced even

Successfully installed certifi-2026年6月17日 charset_normalizer-3.4.7 idna-3.18 lxml-6.1.1 osmium-4.3.1 requests-2.34.2 urllib3-2.7.0
00:58:53 INFO Read 330 metro networks
00:58:53 INFO Reading /home/planet/build/subway/subways.osm
Traceback (most recent call last):
 File "/root/subways/scripts/process_subways.py", line 276, in <module>
 main()
 ~~~~^^
 File "/root/subways/scripts/process_subways.py", line 164, in main
 osm = load_xml(options.xml)
 File "/root/subways/subways/subway_io.py", line 25, in load_xml
 for event, element in etree.iterparse(f):
 ~~~~~~~~~~~~~~~^^^
 File "src/lxml/iterparse.pxi", line 213, in lxml.etree.iterparse.__next__
 ...
 File "src/lxml/parser.pxi", line 689, in lxml.etree._raiseParseError
 File "/home/planet/build/subway/subways.osm", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
Traceback (most recent call last):
 File "/root/subways/tools/v2h/validation_to_html.py", line 262, in <module>
 main()
 ~~~~^^
 File "/root/subways/tools/v2h/validation_to_html.py", line 163, in main
 data = {c["name"]: CityData(c) for c in json.load(f)}
...
 File "/usr/lib/python3.13/json/decoder.py", line 363, in raw_decode
 raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Requirement already satisfied: pip in ./tools/python/transit/.venv/lib/python3.13/site-packages (25.1.1)
Collecting pip
 Downloading pip-26.1.2-py3-none-any.whl.metadata (4.6 kB)

The core issue is unknown (and hopefully a rerun would fix it).

However this error hasn't been surfaced in Codeberg actions - its all green as usual. It needs to fail properly so that its easier to detect.
But it continued to install dependencies?

This subway run had issues https://codeberg.org/comaps/comaps/actions/runs/19731/jobs/1/attempt/1 and https://mapgen-fi-1.comaps.app/subway/validator/index.html hasn't been produced even ``` Successfully installed certifi-2026年6月17日 charset_normalizer-3.4.7 idna-3.18 lxml-6.1.1 osmium-4.3.1 requests-2.34.2 urllib3-2.7.0 00:58:53 INFO Read 330 metro networks 00:58:53 INFO Reading /home/planet/build/subway/subways.osm Traceback (most recent call last): File "/root/subways/scripts/process_subways.py", line 276, in <module> main() ~~~~^^ File "/root/subways/scripts/process_subways.py", line 164, in main osm = load_xml(options.xml) File "/root/subways/subways/subway_io.py", line 25, in load_xml for event, element in etree.iterparse(f): ~~~~~~~~~~~~~~~^^^ File "src/lxml/iterparse.pxi", line 213, in lxml.etree.iterparse.__next__ ... File "src/lxml/parser.pxi", line 689, in lxml.etree._raiseParseError File "/home/planet/build/subway/subways.osm", line 1 lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1 Traceback (most recent call last): File "/root/subways/tools/v2h/validation_to_html.py", line 262, in <module> main() ~~~~^^ File "/root/subways/tools/v2h/validation_to_html.py", line 163, in main data = {c["name"]: CityData(c) for c in json.load(f)} ... File "/usr/lib/python3.13/json/decoder.py", line 363, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Requirement already satisfied: pip in ./tools/python/transit/.venv/lib/python3.13/site-packages (25.1.1) Collecting pip Downloading pip-26.1.2-py3-none-any.whl.metadata (4.6 kB) ``` The core issue is unknown (and hopefully a rerun would fix it). However this error hasn't been surfaced in Codeberg actions - its all green as usual. It needs to fail properly so that its easier to detect. But it continued to install dependencies?
Author
Owner
Copy link

But could be also a problem with a wrapper to run it tools/unix/maps/generate_subways.sh?

But could be also a problem with a wrapper to run it `tools/unix/maps/generate_subways.sh`?
Author
Owner
Copy link

It happened again, similar but different subways.osm parsing error https://codeberg.org/comaps/comaps/actions/runs/19900/jobs/1/attempt/1

00:57:40 INFO Reading /home/planet/build/subway/subways.osm
Traceback (most recent call last):
 File "/root/subways/scripts/process_subways.py", line 276, in <module>
 main()
 ~~~~^^
 File "/root/subways/scripts/process_subways.py", line 164, in main
 osm = load_xml(options.xml)
 File "/root/subways/subways/subway_io.py", line 25, in load_xml
 for event, element in etree.iterparse(f):
 ~~~~~~~~~~~~~~~^^^
 File "src/lxml/iterparse.pxi", line 213, in lxml.etree.iterparse.__next__
 File "src/lxml/iterparse.pxi", line 198, in lxml.etree.iterparse.__next__
 File "src/lxml/iterparse.pxi", line 229, in lxml.etree.iterparse._read_more_events
 File "src/lxml/parser.pxi", line 1516, in lxml.etree._FeedParser.close
 File "src/lxml/parser.pxi", line 638, in lxml.etree._ParserContext._handleParseResult
 File "src/lxml/parser.pxi", line 647, in lxml.etree._ParserContext._handleParseResultDoc
 File "src/lxml/parser.pxi", line 765, in lxml.etree._handleParseResult
 File "src/lxml/parser.pxi", line 689, in lxml.etree._raiseParseError
 
 File "/home/planet/build/subway/subways.osm", line 9925657
lxml.etree.XMLSyntaxError: Specification mandates value for attribute ch, line 9925657, column 106
Traceback (most recent call last):
 File "/root/subways/tools/v2h/validation_to_html.py", line 262, in <module>
 main()
 ~~~~^^
 File "/root/subways/tools/v2h/validation_to_html.py", line 163, in main
 data = {c["name"]: CityData(c) for c in json.load(f)}
 ~~~~~~~~~^^^
 File "/usr/lib/python3.13/json/__init__.py", line 293, in load
 return loads(fp.read(),
 cls=cls, object_hook=object_hook,
 parse_float=parse_float, parse_int=parse_int,
 parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
 File "/usr/lib/python3.13/json/__init__.py", line 346, in loads
 return _default_decoder.decode(s)
 ~~~~~~~~~~~~~~~~~~~~~~~^^^
 File "/usr/lib/python3.13/json/decoder.py", line 345, in decode
 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
 ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3.13/json/decoder.py", line 363, in raw_decode
 raise JSONDecodeError("Expecting value", s, err.value) from None
 
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It happened again, similar but different subways.osm parsing error https://codeberg.org/comaps/comaps/actions/runs/19900/jobs/1/attempt/1 ``` 00:57:40 INFO Reading /home/planet/build/subway/subways.osm Traceback (most recent call last): File "/root/subways/scripts/process_subways.py", line 276, in <module> main() ~~~~^^ File "/root/subways/scripts/process_subways.py", line 164, in main osm = load_xml(options.xml) File "/root/subways/subways/subway_io.py", line 25, in load_xml for event, element in etree.iterparse(f): ~~~~~~~~~~~~~~~^^^ File "src/lxml/iterparse.pxi", line 213, in lxml.etree.iterparse.__next__ File "src/lxml/iterparse.pxi", line 198, in lxml.etree.iterparse.__next__ File "src/lxml/iterparse.pxi", line 229, in lxml.etree.iterparse._read_more_events File "src/lxml/parser.pxi", line 1516, in lxml.etree._FeedParser.close File "src/lxml/parser.pxi", line 638, in lxml.etree._ParserContext._handleParseResult File "src/lxml/parser.pxi", line 647, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 765, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 689, in lxml.etree._raiseParseError File "/home/planet/build/subway/subways.osm", line 9925657 lxml.etree.XMLSyntaxError: Specification mandates value for attribute ch, line 9925657, column 106 Traceback (most recent call last): File "/root/subways/tools/v2h/validation_to_html.py", line 262, in <module> main() ~~~~^^ File "/root/subways/tools/v2h/validation_to_html.py", line 163, in main data = {c["name"]: CityData(c) for c in json.load(f)} ~~~~~~~~~^^^ File "/usr/lib/python3.13/json/__init__.py", line 293, in load return loads(fp.read(), cls=cls, object_hook=object_hook, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/usr/lib/python3.13/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ~~~~~~~~~~~~~~~~~~~~~~~^^^ File "/usr/lib/python3.13/json/decoder.py", line 345, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/json/decoder.py", line 363, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ```
Author
Owner
Copy link

I've re-ran subways without updating the planet file https://codeberg.org/comaps/comaps/actions/runs/19904/jobs/1/attempt/1
And this time it had been successful, so looks like its not a problem with a planet file

I've re-ran subways without updating the planet file https://codeberg.org/comaps/comaps/actions/runs/19904/jobs/1/attempt/1 And this time it had been successful, so looks like its not a problem with a planet file
Sign in to join this conversation.
No Branch/Tag specified
master
jb_test
jb_lt
jb_tram
pastk-TEST-pr-62
pastk-TEST-pr-61
pastk-TEST-pr-54
pastk-TEST-pr-39
pastk-TEST-pr-41-and-39
pastk-TEST-pr-48
pastk-TEST-pr-41
pastk-TEST-pr-43
upstream
fixes-from-alexey2
fixes
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
comaps/subways#96
Reference in a new issue
comaps/subways
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?