Skip to content

AttributeError: module 'cgi' has no attribute 'escape' #1

Open

Description

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'

Activity

  1. David-Baddeley commented on Mar 18, 2024

    @David-Baddeley
    Contributor

    That's a python version compatibility issue - the escape() function has moved from the cgi module to the html module. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions