Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9983 closed defect (worksforme)

TypeError: int() argument must be a string or a number

Reported by: get@… Owned by:
Priority: normal Milestone:
Component: version control/browser Version: 0.12.1
Severity: normal Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a GET operation on /browser/hurricane-dev/branches/old/sysvinit-scripts/rc.4, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'path': u'/hurricane-dev/branches/old/sysvinit-scripts/rc.4'}

User agent: Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.9.2.3) Gecko/20100402 Hurricane Distribution v0.1/0.2 (Valhalla) Firefox/3.6.3

System Information

Trac 0.12.1
Babel 0.9.5 (translations unavailable)
Docutils 0.7
FullBlog 0.1.1
Genshi 0.6
mod_python 3.2.8
MySQL server: "5.0.77", client: "5.0.77", thread-safe: 1
MySQLdb 1.2.1
Pygments 1.1.1
Python 2.4.3 (#1, Nov 11 2010, 13:34:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
setuptools 0.6c5
Subversion 1.4.2 (r22196)
jQuery 1.4.2

Enabled Plugins

PrivateWikis 1.0.0
TracAccountManager 0.2.1dev-r7737
TracCodeProcessor 0.11.0-r308
TracFullBlogPlugin 0.1.1
TracNewsFlash 1.0.1
TracPaste 0.2.2
TracTags 0.6
Tracticketstats 2.2.0
TracTocMacro 11.0.0.3
TracWysiwyg 0.12.0.2-r8691

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.12.1-py2.4.egg/trac/web/main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.12.1-py2.4.egg/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.12.1-py2.4.egg/trac/versioncontrol/web_ui/browser.py", line 430, in process_request
    path=node.created_path)
  File "/usr/lib/python2.4/site-packages/Trac-0.12.1-py2.4.egg/trac/versioncontrol/cache.py", line 342, in previous_rev
    return self._next_prev_rev('<', rev, path)
  File "/usr/lib/python2.4/site-packages/Trac-0.12.1-py2.4.egg/trac/versioncontrol/cache.py", line 378, in _next_prev_rev
    return int(rev)
TypeError: int() argument must be a string or a number

Attachments (0)

Change History (8)

comment:1 by Christian Boos, 14 years ago

Milestone: not applicable

Did you just create that repository with type svn and forgot to resync?

MySQLdb 1.2.1

As a side note, this is a bit old, we recommend 1.2.2 at a minimum (see MySqlDb).

comment:2 by get@…, 14 years ago

Its a centos 5.5 vps so its the actual stable version on yum of mysql.

[root@n6s004 ~]# ENV=/var/www/hurricane/; trac-admin $ENV repository resync "hurricane-dev"
Resyncing repository history for hurricane-dev... 
13 revisions cached.
Done.

We're using since 13 revs the svn on trac. Seems to be a problem with db and utf8_general_ci, ive changed all tables to this, because diff view didnt work before, but now i can't see directly the files. It returns me the described error..

comment:3 by Christian Boos, 14 years ago

Sorry, as said on the page cited above, there are known issues with 1.2.1, and the problem you're facing might well be one of these. In addition, utf8_general_ci shouldn't be used anymore, this is also explained in that page. Those guidelines are there for a reason, as they result from previous troubleshooting cycles…

It shouldn't be that hard to get a new version of MySQLdb (pick 1.2.3 as it's stable by now), and rebuild it by yourself (also there please take care to follow the guidelines and build a thread-safe version of the bindings).

comment:4 by get@…, 14 years ago

will try to update mysql then, to fix it now, whats the correct settings for encoding ?

comment:5 by Christian Boos, 14 years ago

Please do read MySqlDb.

comment:6 by get@…, 14 years ago

Resolution: fixed
Status: newclosed

Fixed the issue with db, removing the MySQL-Python package via yum and installing newer version using easy_install

easy_install --always-unzip  MySQL-python
...
Adding MySQL-python 1.2.3 to easy-install.pth file

Installed /usr/lib/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-i686.egg

Restarted the Webserver, and all looks fine again.

*i found out, that installing python eggs via easy_install on centos, didn't work without —always-unzip flag.

Many thanks for your time and the fast answers!

comment:7 by Remy Blank, 14 years ago

Resolution: fixedworksforme

comment:8 by Christian Boos, 14 years ago

Keywords: mysql added

Thanks for the feedback!

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.