Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #964 (closed defect: invalid)

Opened 11 years ago

Last modified 7 years ago

tg-admin sql upgrade is "broken"

Reported by: bader Owned by: anonymous
Priority: low Milestone: 1.0.x bugfix
Component: SQLObject Version: 0.9a6
Severity: minor Keywords: tgadmin, sqlobject-admin
Cc:

Description

I know that is not the normal way to do it but it shouldn't crash by doing this:

bader@banihilal:~/projets/Lurker $ tg-admin sql upgrade
Using database URI sqlite:///home/bader/projets/Lurker/devdata.sqlite
Traceback (most recent call last):
  File "/usr/local/bin/tg-admin", line 7, in ?
    sys.exit(
  File "/usr/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/c                                                                                                                                
ommand/base.py", line 275, in main
    command.run()
  File "/usr/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/c                                                                                                                                
ommand/base.py", line 134, in run
    command.the_runner.run(sys.argv)
  File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlo                                                                                                                                
bject/manager/command.py", line 102, in run
    runner.run()
  File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlo                                                                                                                                
bject/manager/command.py", line 233, in run
    self.command()
  File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlo                                                                                                                                
bject/manager/command.py", line 1063, in command
    version_to = os.path.basename(self.find_last_version())
  File "/usr/lib/python2.4/posixpath.py", line 112, in basename
    return split(p)[1]
  File "/usr/lib/python2.4/posixpath.py", line 77, in split
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

Change History

comment:1 Changed 11 years ago by jorge.vargas

  • Priority changed from normal to low
  • Component changed from Installation to SQLObject
  • Severity changed from major to minor
  • Milestone set to 1.0b2

Please refer this to the sql=object mailing list and based on that create a ticket on their tracker and post a link to it here.

on the other hand I don't think a bug should be file starting with "I know this is not the way to do it but..."

please do not set properties unless your sure, this had nothing to do with instalation and it isn't a mayor issue.

comment:2 Changed 11 years ago by jorge.vargas

I notice your using sqlite

I believe that's broken because of the update support

 http://www.sqlite.org/omitted.html

which of course is not implemented by sqlobject-admin aka tg-admin sql

please correct me if i'm wrong. or close as invalid/wontfix

comment:3 Changed 11 years ago by ptwobrussell

For what it's worth, I just tired to run tg-admin on a postgres back end and got the same type error. Stacktrace is below:

Using database URI postgres://foo@localhost/foodev
Traceback (most recent call last):
  File "/usr/local/bin/tg-admin", line 7, in ?
    sys.exit(
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/command/base.py", line 356, in main
    command.run()
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/command/base.py", line 143, in run
    command.the_runner.run(sys.argv)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/manager/command.py", line 102, in run
    runner.run()
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/manager/command.py", line 233, in run
    self.command()
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/manager/command.py", line 1069, in command
    version_to = os.path.basename(self.find_last_version())
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/posixpath.py", line 112, in basename
    return split(p)[1]
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/posixpath.py", line 77, in split
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

I'll look into this a bit later and if something jumps out at me, I'll post back on here. I'm using 1.0b1, BTW.

comment:4 Changed 11 years ago by alberto

  • Milestone changed from 1.0b2 to 1.1

comment:5 Changed 11 years ago by jorge.vargas

updates?

comment:6 Changed 10 years ago by alberto

  • Milestone changed from 1.1 to __unclassified__

Batch moved into unclassified from 1.1 to properly track progress on the later

comment:7 Changed 9 years ago by jorge.vargas

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

comment:8 Changed 7 years ago by chrisz

  • Milestone changed from __unclassified__ to 1.0.x bugfix
Note: See TracTickets for help on using tickets.