Modify ↓
Opened 3 years ago
Closed 2 years ago
#14153 closed defect (fixed)
Unable to use ASCIIMath macro in Trac 1.5 / Python 3
| Reported by: | Owned by: | Jun Omae | |
|---|---|---|---|
| Priority: | normal | Component: | AsciiMathMacro |
| Severity: | normal | Keywords: | python3 patch |
| Cc: | Trac Release: |
Description
When trying to use this macro in Trac 1.5 and Python 3 (3.10), I get this:
2022-09-08 14:45:08,892 Trac[loader]
ERROR: Failed to load plugin from /vol1/trac/systems/plugins/ASCIIMath.py:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/Trac-1.5.4.dev0-py3.10.egg/trac/loader.py", line 105, in _load_py_files
imp.load_source(plugin_name, plugin_file)
File "/usr/lib64/python3.10/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 719, in _load
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/vol1/trac/systems/plugins/ASCIIMath.py", line 342, in <module>
Symbol(input="alpha", el=El("mi", u"\u03B1"))
File "/vol1/trac/systems/plugins/ASCIIMath.py", line 80, in El
if isinstance(text, basestring):
NameError: name 'basestring' is not defined
This is with version 18497 of the macro.
Attachments (1)
Change History (6)
comment:1 Changed 3 years ago by
| Owner: | Jeffrey Armstrong deleted |
|---|---|
| Status: | new → assigned |
comment:2 Changed 3 years ago by
| Status: | assigned → new |
|---|
comment:3 Changed 3 years ago by
I have attached my diffs to make this work with Python 3. I don't know if it will work with Python 2 as I no longer have that installed for testing. I think most differences were things that were depreciated a while ago, and were more recently finally removed.
It works for me in a current Trac 1.5
comment:4 Changed 3 years ago by
| Keywords: | patch added |
|---|
comment:5 Changed 2 years ago by
| Owner: | set to Jun Omae |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
In 18583:
Note: See
TracTickets for help on using
tickets.



I have no idea why this ticket is attached to me...