You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError: module 'cgi' has no attribute 'escape' #1
Hello, I'm a student and this package is just what I'm looking for. But I have this error for mProfile.report() :
File ~\anaconda3\Lib\site-packages\mprofile-0.8.0-py3.11.egg\mProfile\colorize_db_t.py:237 in call
self.out.write(cgi.escape(toktext))
AttributeError: module 'cgi' has no attribute 'escape'
For context this repo was supposed to replace the versions in python-microscopy, but stalled when I found the pypi name was already taken. Factoring the profiling functions out as separate packages is still on the TODO list, subject to finding a new name and some spare time.
Activity
David-Baddeley commentedon Mar 18, 2024
That's a python version compatibility issue - the
escape()function has moved from thecgimodule to thehtmlmodule. It has been fixed in the version here ... https://github.com/python-microscopy/python-microscopy/blob/master/PYME/util/mProfile/colorize_db_t.py but hasn't made it's way across here.For context this repo was supposed to replace the versions in python-microscopy, but stalled when I found the pypi name was already taken. Factoring the profiling functions out as separate packages is still on the TODO list, subject to finding a new name and some spare time.