> > Python/codecs.c holds search functions in _PyCodec_SearchPath, among > > them encodings.__init__.search_function. It also imports "encodings" > > the first time somebody invokes .encode/.decode on some kind of > > string, but doesn't hold onto the module. > > Perhaps it should hold onto the module as well? That would avoid it > getting cleaned up before possibly dependent modules. Re-importing encodings would still do funny things, then: It would register itself once more, resulting in two search functions being registered. codecs would hold one of the encodings modules, but not the other. So if the second search function is ever invoked, you get the same error. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4