Edgewall Software
Modify

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#13445 closed defect (cantfix)

SyntaxError: invalid syntax ( class HTTPException(TracBaseError, metaclass = ABCMeta):

Reported by: Tomasz Brzezina <tomasz@…> Owned by:
Priority: normal Milestone:
Component: general Version: 1.5.3
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I try to install 1.5.3 (I give up with 1.4 on bullseye).

Installed all needed packages and version 1.5.3:

pip install https://download.edgewall.org/trac/Trac-1.5.3-py3-none-any.whl

all needed packages installed with venv at /var/lib/trac/env

Apache2 uses wsgi:

WSGIScriptAlias /trac /var/lib/trac/apache/trac.wsgi
WSGIDaemonProcess trac python-path=/var/lib/trac:/var/lib/trac/env/lib/python3.9/site-packages

After apache2 restart accessing trac gives error:

Traceback (most recent call last):
File "/var/lib/trac/apache/trac.wsgi", line 13, in <module>
import trac.web.main
File "/var/lib/trac/env/lib/python3.9/site-packages/trac/web/__init__.py", line 14, in <module>
from trac.web.api import *
File "/var/lib/trac/env/lib/python3.9/site-packages/trac/web/api.py", line 195
class HTTPException(TracBaseError, metaclass=ABCMeta):
                                            ^
SyntaxError: invalid syntax

I can't see what's wrong.

Attachments (0)

Change History (2)

comment:1 by Jun Omae, 7 months ago

Resolution: cantfix
Status: newclosed

InstallationIssue.

The syntax is introduced in Python 3, however SyntaxError is raised on your environment. I guess you're using Apache with mod-wsgi linked Python 2.

Please ask on the MailingList for support questions.

comment:2 by Jun Omae, 7 months ago

Try to install libapache2-mod-wsgi-py3. If libapache2-mod-wsgi is installed, uninstall libapache2-mod-wsgi before the installing.

$ dpkg -S /usr/lib/apache2/modules/mod_wsgi.so
libapache2-mod-wsgi-py3: /usr/lib/apache2/modules/mod_wsgi.so

$ ldd /usr/lib/apache2/modules/mod_wsgi.so
        linux-vdso.so.1 (0x00007ffd3858a000)
        libpython3.7m.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0 (0x00007fbe40d6b000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fbe40d31000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbe40d10000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbe40d0b000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fbe40d06000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbe40b83000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbe409c0000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fbe40983000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbe40765000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fbe412aa000)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.