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 #440 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

tg-admin sql create fails on joins with SQLObject R1530

Reported by: Joost Owned by: anonymous
Priority: normal Milestone: 0.9
Component: SQLObject Version:
Severity: major Keywords:


After updating from r518 to r549 I get the following:


Using database URI sqlite:///c|/databases/ordermanager_dev.db
Exception exceptions.AttributeError: "'NoneType' object has no attribute 'releaseConnection'" in <bound method Transaction.__del__ of <sqlobject.dbconnection.Transaction object at 0x0127EFF0>> ignored

Testcase model:

class Customer(SQLObject):
	address = SingleJoin("Address")# also fails on MultipleJoin

class Address(SQLObject):
	customer = ForeignKey("Customer")

The tables are created fine though.

This happens with sqlobject r1530. It didn't happen with version r1500.

Change History

comment:1 Changed 13 years ago by anonymous

I am also seeing this with the .9a2 release that came out recently. Specifcally, here is my model:

class Item(SQLObject):
	name = StringCol(alternateID = True)
	description = StringCol()
	link = StringCol()
	categories = RelatedJoin('Category')

class Category(SQLObject):
	name = StringCol(alternateID = True)
	items = RelatedJoin('Item')

comment:2 Changed 13 years ago by anonymous

  • Milestone set to 0.9a3

comment:3 Changed 13 years ago by kevin

  • Milestone changed from 0.9a3 to 0.9

I get this error:

Exception exceptions.TypeError?: "'NoneType?' object is not callable" in <bound method Transaction.del of <sqlobject.dbconnection.Transaction object at 0x12a5090>> ignored

The reason this is happening is not immediately apparent, but I'm not going to troubleshoot further right this moment. This is ugly, but it's not actually causing grief.

comment:4 Changed 13 years ago by kevin

I misinterpreted this ticket. The relation table (in the case of a many-to-many) is not being created, which *is* a real problem.

comment:5 Changed 13 years ago by kevin

  • Severity changed from normal to blocker

comment:6 Changed 13 years ago by qhartman@…

ok, done some more poking around on this, and it _seems_ to only affect creating databases with SQLite because if I switch to using mysql instead it works as expected. This makes me believe it is either a problem with how SQLObject handles creating relationships in SQLite, or tg-admin does something different when when using a mysql database. Personally, I'm leaning towards the problem being in SQLObject. I don't really know where to go from here, but hopefully this will save someone with better python skills some time when trying to fix this one.

comment:7 Changed 13 years ago by godoy

This looks to me like the recursive problem that is becoming somewhat common... Please take a look at #279 and try using soClasses.

If this solves your problem close this ticket as "fixed", please.

comment:8 Changed 13 years ago by godoy

  • Severity changed from blocker to major

I'm changing the severity from blocker to major since it works with some database and not with other and there are recipes for solving that problem.

We're still waiting for your feedback on this.

comment:9 Changed 13 years ago by jorge.vargas

closing this please reopen if #279 doesn't fix it.

comment:10 Changed 13 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.