Hello,

The ini file is the same as that of paster. The DB uri is the same. When I 
run 'paster serve production.ini --daemon' , I have no errors.  When 
running under wsgi, the sqlalchemy error props up. For now, I am running my 
app using the paster daemon mode since the apache wsgi is spewing up that 
NoSuchColumnError.

sql URL :

sqlalchemy.url=postgresql://yyyyy:[email protected]:5432/sorterDB


Best Regards,

Neil



On Thursday, February 14, 2013 7:44:42 PM UTC+8, Moritz Schlarb wrote:
>
> How do you configure mod_wsgi for Apache?
> Which configuration file did you use there? 
> development.init/deployment.ini_tmpl?
> Which configuration file did you use to create the database - was 
> sqlalchemy.uri the same?
>
> Maybe post the relevant configuration files here (check for passwords, of 
> course...).
>
> Am Donnerstag, 14. Februar 2013 01:32:59 UTC+1 schrieb Neil Ablang:
>>
>> Hello,
>>
>>
>> here is my table from model folder. Its working on my paster serve setup. 
>> Yes the DB is created, The __init__.py  has also been updated to add the 
>> models below.
>>
>> thanks in advance for any help.
>>
>>
>> # -*- coding: utf-8 -*-
>> """Sample model module."""
>>
>> from sqlalchemy import *
>> from sqlalchemy.orm import mapper, relation
>> from sqlalchemy import Table, ForeignKey, Column
>> from sqlalchemy.types import Integer, Unicode
>> #from sqlalchemy.orm import relation, backref
>>
>> from sorter.model import DeclarativeBase, metadata, DBSession
>>
>>
>> class SortedFiles(DeclarativeBase):
>>     """Table for Sorted Files"""
>>     __tablename__ = "BNTSortedFiles"
>>
>>     record_id = Column(Integer, primary_key=True)
>>     fileName = Column(String,nullable=True,unique=True)
>>     docTitle = Column(String,nullable=True)
>>     docTag = Column(String,nullable=True)
>>     docType = Column(String,nullable=True)
>>     recDate = Column(String,nullable=True)
>>     group = Column(String,nullable=True)
>>     jobName = Column(String,nullable=True)
>>     stateCounty = Column(String,nullable=True)
>>     ftpPath = Column(String,nullable=True)
>>     move = Column(Boolean,nullable=False,default='False')
>>     dispatch = Column(Boolean,nullable=False,default='False')
>>     done= Column(Boolean,nullable=False,default='False')
>>
>> class StateCountyRecDate(DeclarativeBase):
>>     """Table for State County Recording Date"""
>>     __tablename__ = "StateCountyRecDate"
>>     
>>     record_id = Column(Integer, primary_key=True)
>>     recDate = Column(String,nullable=True)
>>     stateCounty = Column(String,nullable=True)
>>     dtaImgStatus = Column(Boolean,nullable=False,default='False')
>>
>> On Thursday, February 14, 2013 3:15:39 AM UTC+8, Mengu wrote:
>>>
>>> have you set your database information in your config file and have 
>>> you created your database and tables? also, let us see your model. 
>>>
>>> On Feb 13, 11:22 am, Neil Ablang <[email protected]> wrote: 
>>> > Hello, 
>>> > 
>>> > My turbogears application is working fine with paster serve. 
>>> > 
>>> > But when deployedto Apache Httpd, Im encountering the error: 
>>> > NoSuchColumnError: "Could not locate column in row for column 
>>> > 
>>> > Without database access there are no errors. 
>>> > 
>>> > What have I done wrong? I used the procedure to install turbogears as 
>>> > describe in turbogears main page. 
>>> > 
>>> > Error transcript provided below: 
>>> > 
>>> > Best Regards, 
>>> > 
>>> > Neil Ablang 
>>> > 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     stateList = 
>>> > DBSession.query(StateCountyRecDate).all() 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>> > 
>>> "/usr/local/turbogears/sorter/lib/python2.6/site-packages/SQLAlchemy-0.7.9- 
>>> py2.6-linux-i686.egg/sqlalchemy/orm/query.py", 
>>> > line 2115, in all 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     return list(self) 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>> > 
>>> "/usr/local/turbogears/sorter/lib/python2.6/site-packages/SQLAlchemy-0.7.9- 
>>> py2.6-linux-i686.egg/sqlalchemy/orm/query.py", 
>>> > line 2348, in instances 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     rows = 
>>> [process[0](row, 
>>> > None) for row in fetch] 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>> > 
>>> "/usr/local/turbogears/sorter/lib/python2.6/site-packages/SQLAlchemy-0.7.9- 
>>> py2.6-linux-i686.egg/sqlalchemy/orm/mapper.py", 
>>> > line 2029, in _instance 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     tuple([row[column] 
>>> for 
>>> > column in pk_cols]) 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>> > 
>>> "/usr/local/turbogears/sorter/lib/python2.6/site-packages/SQLAlchemy-0.7.9- 
>>> py2.6-linux-i686.egg/sqlalchemy/engine/base.py", 
>>> > line 2834, in _key_fallback 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ] 
>>> > expression._string_or_unprintable(key)) 
>>> > [Wed Feb 13 17:08:24 2013] [error] [client ] NoSuchColumnError: "Could 
>>> not 
>>> > locate column in row for column 'StateCountyRecDate.record_id'" 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to