Skip to content

cacheRoutesGmap: read raw plist to avoid nska_deserialize 'unhashable' warnings#1626

Merged
abrignoni merged 1 commit into
mainfrom
fix-cacheroutesgmap-nska-warnings
Jun 26, 2026
Merged

cacheRoutesGmap: read raw plist to avoid nska_deserialize 'unhashable' warnings#1626
abrignoni merged 1 commit into
mainfrom
fix-cacheroutesgmap-nska-warnings

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Problem

Running Google Maps Cache Routes floods the log with unhashable NSKeyedArchiver warnings — one per CachedRoutes file.

Root cause

The artifact walks the raw $objects array itself (entry['_coordinateLat']), but it read each file via get_plist_file_content, which — for NSKeyedArchiver plists — routes through nska_deserialize (ilapfuncs.py:641):

if plist_content.get('$archiver','') == 'NSKeyedArchiver':
    return nska_deserialize.deserialize_plist(file_path)

These CachedRoutes archives contain unhashable NSDictionary keys, so the deserializer emits the unhashable warnings. Worse, that call is counterproductive: deserialization strips the $objects array, which is exactly what this artifact reads — so the deserialize step is pure cost.

Fix

Read the raw plist directly with plistlib.load and skip the deserializer entirely. No nska_deserialize call ⇒ no warnings, and $objects is present as the code already expects (so it's also more correct, not just quieter).

Also

Re-enables KML output (output_types: "all"). cacheRoutesGmap was pulled out of the KML batch (#1624) solely because of these warnings; with the warnings fixed, it rejoins. It has exact Latitude/Longitude columns, so kmlgen now produces a KML.

Verify

pylint 10.00/10, py_compile OK, audit confirms it's KML-producing. Note: get_plist_file_content/nska now appear only in an explanatory code comment, not in any code path.

The artifact walks the raw $objects array itself, but read files via
get_plist_file_content, which runs nska_deserialize on NSKeyedArchiver plists.
These CachedRoutes archives contain unhashable NSDictionary keys, so the
deserializer floods the log with 'unhashable' warnings -- and it strips the
$objects array this artifact actually needs. Read the raw plist with
plistlib.load instead: no deserializer, no warnings, $objects available as
intended.

Also re-enables KML output (output_types 'all'), which was reverted out of the
KML batch (#1624) specifically because of these warnings.
@abrignoni abrignoni merged commit 149daee into main Jun 26, 2026
1 check passed
@abrignoni abrignoni deleted the fix-cacheroutesgmap-nska-warnings branch June 26, 2026 22:12
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.

1 participant