Opened 4 years ago

Closed 4 years ago

Last modified 21 months ago

#13735 closed defect (fixed)

Python3: ModuleNotFoundError: No module named 'StringIO'

Reported by: Peter Suter Owned by: Peter Suter
Priority: normal Component: CardsPlugin
Severity: normal Keywords: python3
Cc: Trac Release:


Plugin fails to load with Python3:

	ModuleNotFoundError: No module named 'StringIO'

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by Peter Suter

  • cards/

    diff -r 02f4b03156ba -r a23ecd93e3f7 cards/
    a b  
    44from json.encoder import JSONEncoder
    55import pkg_resources
    66import re
    7 from StringIO import StringIO
     8    from StringIO import StringIO # Python 2
     9except ImportError:
     10    from io import StringIO # Python 3
    912from trac import __version__
    1013from trac.db.api import DatabaseManager

comment:2 Changed 4 years ago by Peter Suter

Resolution: fixed
Status: newclosed

In 17667:

CardsPlugin: Python3 compatibility.
(fix #13735)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Peter Suter.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.