Modify ↓
#14254 closed defect (fixed)
Python 3 says SyntaxError: multiple exception types must be parenthesized
Reported by: | clemens | Owned by: | Álvaro Iradier |
---|---|---|---|
Priority: | normal | Component: | SearchAllPlugin |
Severity: | blocker | Keywords: | |
Cc: | clemens, stei | Trac Release: | 1.6 |
Description (last modified by )
Running the SearchAllPlugin (revision r18446) on TRAC 1.6 with Python 3 makes problems.
Basically the plugin is supposed to offer a new check-box "All projects" in the search page.
In the log file we can see the error:
2023-11-19 15:58:08,012 Trac[env] INFO: -------------------------------- environment startup [Trac 1.6] -------------------------------- 2023-11-19 15:58:08,190 Trac[loader] ERROR: Skipping "tracsearchall = tracsearchall.searchall": Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/trac/loader.py", line 80, in _load_eggs entry.load(require=True) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2468, in load return self.resolve() ^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2474, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/tracsearchall/searchall.py", line 120 except Exception, ex: ^^^^^^^^^^^^^ SyntaxError: multiple exception types must be parenthesized (searchall.py, line 120)
I am not a Python expert, but source:/searchallplugin/0.11/tracsearchall/searchall.py#L120 contains except Exception, ex:
where it should rather be except Exception as ex:
.
As I learned from here.
Attachments (0)
Change History (7)
comment:1 Changed 12 months ago by
Cc: | clemens added |
---|
comment:2 Changed 12 months ago by
Trac Release: | → 1.6 |
---|
comment:3 Changed 11 months ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 11 months ago by
I tested the bugfix and can confirm that revision r18605 works with TRAC 1.6.
Thanks
Shall we consider incrementing the version number for SearchAllPlugin from 0.9 to 0.10?
comment:5 Changed 11 months ago by
Description: | modified (diff) |
---|
comment:6 Changed 11 months ago by
Cc: | stei added |
---|
Note: See
TracTickets for help on using
tickets.
Fixed in [18605].