Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

#3997 closed defect (wontfix)

strange bug detect in my trac ?

Reported by: lvtien Owned by: Jonas Borgström
Priority: high Milestone:
Component: general Version: 0.10
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description (last modified by Christian Boos)

Error display :

Trac detected an internal error: 'psycopg2._psycopg.connection' object has no attribute 'set_client_encoding'

Traceback (most recent call last):
  File "C:/server/Apache2/cgi-bin/trac.cgi", line 20, in ?
    cgi_frontend.run()
  File "C:\server\python243\Lib\site-packages\trac\web\cgi_frontend.py", line 68, in run
    gateway.run(dispatch_request)
  File "C:\server\python243\Lib\site-packages\trac\web\wsgi.py", line 87, in run
    response = application(self.environ, self._start_response)
  File "C:\server\python243\Lib\site-packages\trac\web\main.py", line 346, in dispatch_request
    env = _open_environment(env_path, run_once=environ['wsgi.run_once'])
  File "C:\server\python243\Lib\site-packages\trac\web\main.py", line 50, in _open_environment
    return open_environment(env_path)
  File "C:\server\python243\Lib\site-packages\trac\env.py", line 434, in open_environment
    if env.needs_upgrade():
  File "C:\server\python243\Lib\site-packages\trac\env.py", line 312, in needs_upgrade
    db = self.get_db_cnx()
  File "C:\server\python243\Lib\site-packages\trac\env.py", line 182, in get_db_cnx
    return DatabaseManager(self).get_connection()
  File "C:\server\python243\Lib\site-packages\trac\db\api.py", line 71, in get_connection
    return self._cnx_pool.get_cnx()
  File "C:\server\python243\Lib\site-packages\trac\db\pool.py", line 83, in get_cnx
    cnx = self._connector.get_connection(**self._kwargs)
  File "C:\server\python243\Lib\site-packages\trac\db\postgres_backend.py", line 40, in get_connection
    return PostgreSQLConnection(path, user, password, host, port, params)
  File "C:\server\python243\Lib\site-packages\trac\db\postgres_backend.py", line 111, in __init__
    cnx.set_client_encoding('UNICODE')
AttributeError: 'psycopg2._psycopg.connection' object has no attribute 'set_client_encoding'
pq_abort: pgconn = 009A2D50, isolevel = 1, status = 1
pq_abort: no transaction to abort
conn_close: PQfinish called
connection_dealloc: deleted connection object at 00C568A8, refcnt = 0

Attachments (0)

Change History (3)

comment:1 by anonymous, 13 years ago

What version of psycopg2 are you using? You need at least v1.99.3.

comment:2 by Christian Boos, 13 years ago

Description: modified (diff)
Keywords: needinfo added

comment:3 by Christian Boos, 13 years ago

Keywords: needinfo removed
Resolution: wontfix
Status: newclosed
AttributeError: 'psycopg2._psycopg.connection' object has no attribute 'set_client_encoding'

This was probably due to an unsupported psycopg2 version. Not that this is currently documented btw, we probably need to create a PostgreSql page one day with all the details…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jonas Borgström 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.