Modify

Opened 3 years ago

Closed 3 years ago

Last modified 9 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:

Description

Plugin fails to load with Python3:

	ModuleNotFoundError: No module named 'StringIO'

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by Peter Suter

  • cards/core.py

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

comment:2 Changed 3 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
Action
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.