Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8671 closed defect (fixed)

Installation problem on Trac 0.11 and PosgreSQL

Reported by: seccanj Owned by: seccanj
Priority: normal Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 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

Attachments (1)

8671.zip (17.9 KB) - added by seccanj 3 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 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>

load_entry_point('Trac==0.11.7', 'console_scripts', 'trac-admin')()

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

line 1321, in run

return admin.onecmd(command)

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

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/admin/console.py",

line 1159, in do_upgrade

self.env.upgrade(backup=do_backup)

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

line 464, in upgrade

participant.upgrade_environment(db)

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

line 138, in upgrade_environment

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

1329, in upgrade_db

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 3 years ago by seccanj

Traceback (most recent call last):
 File "/usr/local/bin/trac-admin", line 8, in <module>
   load_entry_point('Trac==0.11.7', 'console_scripts', 'trac-admin')()
 File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/admin/console.py",
line 1321, in run
   return admin.onecmd(command)
 File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/admin/console.py",
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/admin/console.py",
line 1159, in do_upgrade
   self.__env.upgrade(backup=do_backup)
 File "/usr/local/lib64/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/env.py",
line 464, in upgrade
   participant.upgrade_environment(db)
 File "build/bdist.linux-x86_64/egg/tracgenericworkflow/model.py",
line 138, in upgrade_environment
 File "build/bdist.linux-x86_64/egg/tracgenericclass/model.py", line
1329, in upgrade_db
 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 3 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 3 years ago by Erik Andersson <kirean@…>

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

Any workaround?

comment:5 Changed 3 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.

Changed 3 years ago by seccanj

comment:6 Changed 3 years ago by Erik Andersson <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 3 years ago by Erik Andersson <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.

Thanks for your help.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.