Ok i am really beating my head here I can't add to one of my tables.

class Files(SQLObject):
    employee = ForeignKey('Employee')
    filepath = UnicodeCol(length=100)
    filename = UnicodeCol(length=50)
    description = UnicodeCol(length=100)
    fdate = DateCol()


>>> import model
>>> newfile = model.Files(employee=19,filename='Test.txt',description='Some 
>>> Description',fdate='2007-11-05')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python25\lib\site-packages\sqlobject-0.9.1-py2.5.egg
\sqlobject\declarative.py", line 98, in _wrapper
    return fn(self, *args, **kwargs)
  File "C:\Python25\lib\site-packages\sqlobject-0.9.1-py2.5.egg
\sqlobject\main.py", line 1218, in __init__
    self._create(id, **kw)
  File "C:\Python25\lib\site-packages\sqlobject-0.9.1-py2.5.egg
\sqlobject\main.py", line 1246, in _create
    self.set(**kw)
  File "C:\Python25\lib\site-packages\sqlobject-0.9.1-py2.5.egg
\sqlobject\main.py", line 1093, in set
    kw[name] = dbValue = from_python(value, self._SO_validatorState)
  File "C:\Python25\lib\site-packages\sqlobject-0.9.1-py2.5.egg
\sqlobject\col.py", line 560, in from_python
    return value.encode(self.db_encoding)
AttributeError: class NoDefault has no attribute 'encode'


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to