Modify

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#14265 closed defect (fixed)

Trac 1.6: ERROR: Exception in trac-admin command: 'backlink sync'

Reported by: Tony Albers Owned by: Jun Omae
Priority: normal Component: TracBackLinkPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.6

Description

Hi,

Running Trac 1.6 and TracBackLinkPlugin 1.0.14, tracbacklink.* is enabled in trac.ini

When I run the specified commands after installing the plugin, I get an error from "backlink sync":

(tracinst) www-data@amgtrac01:~$ trac-admin /var/www/tracenvs/trac0 upgrade
Upgrade done.

You may want to upgrade the Trac documentation now by running:

  trac-admin "/var/www/tracenvs/trac0" wiki upgrade 
(tracinst) www-data@amgtrac01:~$ trac-admin "/var/www/tracenvs/trac0" wiki upgrade
Upgrade done: 0 pages upgraded.
(tracinst) www-data@amgtrac01:~$ trac-admin /var/www/tracenvs/trac0 backlink sync
Gathered 380 links from 61 wiki objects
Gathered 0 links from 0 ticket objects
Gathered 0 links from 4 milestone objects
Gathered 0 links from 0 changeset objects
AttributeError: 'NoneType' object has no attribute 'execute'
(tracinst) www-data@amgtrac01:~$

In trac.log:

2023-12-19 09:09:24,167 Trac[console] ERROR: Exception in trac-admin command: 'backlink sync'
Traceback (most recent call last):
  File "/usr/lib/python3.11/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TracAdmin' object has no attribute 'do_backlink'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/tracinst/lib/python3.11/site-packages/trac/admin/console.py", line 81, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/cmd.py", line 216, in onecmd
    return self.default(line)
           ^^^^^^^^^^^^^^^^^^
  File "/var/www/tracinst/lib/python3.11/site-packages/trac/admin/console.py", line 246, in default
    return self.cmd_mgr.execute_command(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/tracinst/lib/python3.11/site-packages/trac/admin/api.py", line 127, in execute_command
    return f(*fargs)
           ^^^^^^^^^
  File "/var/www/tracinst/lib/python3.11/site-packages/tracbacklink/admin.py", line 71, in _do_sync
    db.update_sequence(None, 'backlink', 'id')
  File "/var/www/tracinst/lib/python3.11/site-packages/trac/db/postgres_backend.py", line 437, in update_sequence
    cursor.execute("SELECT SETVAL(%%s, (SELECT MAX(%s) FROM %s))"
    ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'execute'

Any advice on how to get around this?

Thanks,

/tony

Attachments (0)

Change History (2)

comment:1 Changed 10 months ago by Jun Omae

Resolution: fixed
Status: newclosed

In 18606:

TracBackLinkPlugin/1.0.15: fix AttributeError when invoking backlink sync with PostgreSQL (closes #14265)

comment:2 Changed 10 months ago by Tony Albers

Confirmed working.

Thanks!

/tony

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
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.