Skip to content

Cannot process caches with unescaped &# in the cache name #236

@GeoTime61

Description

@GeoTime61

When I try to process GC25WQJ, name "How Do I Solve All These &#$@! Puzzle Caches?", I get an error:

self.name = cache_details.find(id="ctl00_ContentBody_CacheName").text
                ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'find'

Is it because the cache name has many punctuation characters in it?
These GC codes also fail: GC8AKHK, GCA9PAE, GC6PJNF, GC1FJJT (archived)

This simple program shows the error:

import pycaching
geocaching = pycaching.login()
cache = geocaching.get_cache("GC25WQJ")
print(cache.name)
geocaching.logout()

It is difficult to search for additional caches for testing because the geocaching.com search filter "Geocache name contains" seems to really mean "Geocache name starts with".

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions