Opened 6 years ago

Closed 6 years ago

Installation problem on Trac 0.11 and PosgreSQL

Reported by: Owned by: seccanj seccanj normal TestManagerForTracPlugin normal 0.11

Description

Reporting a mail thread here as a ticket, for reference to other users.

================================================= Hi Roberto!

I'm sorry to bother you this way directly, but I didn't found anything useful from google to my problem. I would appreciate if you could help me a little.

I'm trying to install TestManager 1.4.4 to Trac 0.11.7. I did the installation from source by easy_install. The installation went ok (I think). When I try to enable the plugins, trac tell to execute upgrade. But when executing the upgrade to trac it gives me a error:

"psycopg2.ProgrammingError: type "int64" does not exist LINE4: "time" int64,"

I have updated python-psycopg2 package to version 2.4-1.1 but it didn't help. What is the component which is missing the type int64 or what might be the problem?

The system in running on SUSE Linux Enterprise Server 11 (x86_64) version 11, patch 1. Postgresql-server v8.3.9-0.1.1.

Br, Timo

comment:1 Changed 6 years ago by seccanj

Here are whole error which comes when running the upgrade command:

Traceback (most recent call last):

File "/usr/local/bin/trac-admin", line 8, in <module>

line 1321, in run

line 138, in onecmd

rv = cmd.Cmd.onecmd(self, line) or 0

File "/usr/lib64/python2.6/cmd.py", line 219, in onecmd

return func(arg)

File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/env.py",

File "build/bdist.linux-x86_64/egg/tracgenericworkflow/model.py",

File "build/bdist.linux-x86_64/egg/tracgenericclass/model.py", line

File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/db/util.py",

line 65, in execute

return self.cursor.execute(sql)

File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/db/util.py",

line 65, in execute

return self.cursor.execute(sql)

psycopg2.ProgrammingError: type "int64" does not exist LINE 4: "time" int64,

If the python is correct version, is there any other component that could not understand the int64 type?

comment:2 Changed 6 years ago by seccanj

Traceback (most recent call last):
File "/usr/local/bin/trac-admin", line 8, in <module>
line 1321, in run
line 138, in onecmd
rv = cmd.Cmd.onecmd(self, line) or 0
File "/usr/lib64/python2.6/cmd.py", line 219, in onecmd
return func(arg)
File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/env.py",
File "build/bdist.linux-x86_64/egg/tracgenericworkflow/model.py",
File "build/bdist.linux-x86_64/egg/tracgenericclass/model.py", line
File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/db/util.py",
line 65, in execute
return self.cursor.execute(sql)
File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/db/util.py",
line 65, in execute
return self.cursor.execute(sql)
psycopg2.ProgrammingError: type "int64" does not exist
LINE 4:     "time" int64,


comment:3 Changed 6 years ago by seccanj

• Resolution set to fixed
• Status changed from new to closed

Hi Timo, I found your problem. It is Trac's PosgreSQL support which does not convert the int64 column type to bigint.

This mapping was added in Trac 0.12, while I see you're using 0.11.7.

Is it a problem for you to upgrade to 0.12 (I suggest 0.12.2)?

Let me know. Ciao, Roberto

comment:4 Changed 6 years ago by kirean

I ran into this now as well. Not really able to upgrade atm.

Any workaround?

comment:5 Changed 6 years ago by seccanj

Hi Erik, I've developed a piece of code that during plugin installation detects whether Trac has support for timestamps in seconds (which just require an "int" data type, and which is the situation on Trac 0.11) or microseconds (which instead require "int64", on Trac 0.12) and creates the database tables accordingly.

If you wish to try it, I'm attaching the three modified files to this ticket.

Unzip the attached archive and replace the corresponding files in the source tree. tracgenericclass/trunk/tracgenericclass/model.py testman4trac/trunk/testmanager/model.py tracgenericclass/trunk/tracgenericclass/util.py

Please, let me know if it works on MySQL and Trac 0.11 (I don't have such an environment) so that I can put the fix into the main release.

comment:6 Changed 6 years ago by kirean

Hi

I'll try tomorrow!

One question though, why are you talking about MySQL? I am too using PostgreSQL. Just a typo?

comment:7 Changed 6 years ago by kirean

Upgrade worked fine with the patch! So consider this one fixed.

Since I'm on python 2.4 I encountered another issue though when running Trac.. I'll see what I can do about that.