Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

debug line breakdown is printed to stdout for conversions to full length plus codes #78

@markjoshwel

Description

@markjoshwel
~ $ s+ -d -c localcode Temasek Polytechnic > a
surplus version 2.2.0, debug mode (fdf3a86d84@main, Sun 15 Oct 2023 04:08:52 +0800)
debug: parse_query: behaviour.query=['Temasek', 'Polytechnic']
debug: parse_query: split_query=['Temasek', 'Polytechnic']
debug: parse_query: original_query='Temasek Polytechnic'
debug: cli: query=Result(value=StringQuery(query='Temasek Polytechnic'), error=None)
debug: latlong_result.get()=Latlong(latitude=1.34502225, longitude=103.9330556491764, bounding_box=(1.3412034, 1.3487467, 103.9275477, 103.9358576))
debug: location={'suburb': 'Tampines', 'city': 'Singapore', 'county': 'Northeast', 'ISO3166-2-lvl6': 'SG-02', 'country': 'Singapore', 'country_code': 'sg', 'raw': {'place_id': 251179890, 'licence': 'Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright', 'osm_type': 'way', 'osm_id': 795946721, 'lat': '1.3546528', 'lon': '103.9435712', 'class': 'place', 'type': 'suburb', 'place_rank': 19, 'importance': 0.4046330326194005, 'addresstype': 'suburb', 'name': 'Tampines', 'display_name': 'Tampines, Singapore, Northeast, Singapore', 'address': {'suburb': 'Tampines', 'city': 'Singapore', 'county': 'Northeast', 'ISO3166-2-lvl6': 'SG-02', 'country': 'Singapore', 'country_code': 'sg'}, 'boundingbox': ['1.2968768', '1.3758227', '103.9249618', '103.9897584']}, 'latitude': 1.3546528, 'longitude': 103.9435712}
debug: _generate_text: split_iso3166_2=['SG', '02']
debug: _generate_text: using special key arrangements for 'SG-02' (Singapore)
debug: _generate_text_line: [True]               -> True   --------  'Singapore'
~ $ cat a
0       Singapore
8WWM+26 Singapore

the line 0 Singapore should NOT have leaked to stdout

check any prints, writes to stdout.write/stderr.write and see what went wrong

also, check to see if this happens for any other text generation targets

to be fixed for 2024.0.0 (#77)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwaitingWaiting for other issues to merge in first

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions