Thanks, that seems to have fixed it.  I'd actually checked there 
(nominally), but since pythonanywhere holds its bare-repositories in a 
folder tree outside of its normal web2py folder structure, it was a bit 
confusing.

On Monday, 29 June 2015 11:53:57 UTC-7, Niphlod wrote:
>
> usually it's not rocket science.. do you have a 
> databases/***_restaurants.table in your databases folder ?
> if yes, drop it and go to the appadmin controller to recreate it. 
> From the error it seems that web2py is trying to migrate a table that is 
> not on the backend but it's supposed to be there (because of a 
> corresponding .table file found on the folder)
>
> On Monday, June 29, 2015 at 8:37:41 PM UTC+2, Robert Porter wrote:
>>
>> I got everything working fine at home on my Ubuntu 14.04 server.  Then I 
>> did a git push to pythonanywhere.com.  Web2py created all my new tables 
>> except for one, and it continues to fail to create this table.  Tech 
>> support at pythonanywhere can't find the problem.
>>
>> Here's my table that is having problems:
>>
>> db.define_table('restaurants',
>> Field('place_id', 'text', required=True),
>> Field('place_name', 'text'),
>> Field('rest_lat', 'text'),
>> Field('rest_lng', 'text'))
>>
>> I can take off the "required=True" but that doesn't help.  Here's the 
>> error chain:
>>
>> <class '_mysql_exceptions.ProgrammingError'> (1146, "Table 
>> 'trytha$test.restaurants' doesn't exist")
>>
>> Traceback (most recent call last):
>>   File "/var/www/sites/trytha/gluon/restricted.py", line 227, in 
>> restricted
>>     exec ccode in environment
>>   File "/var/www/sites/trytha/applications/trytha/models/db.py", line 
>> 112, in <module>
>>     Field('rest_lng', 'text'))
>>   File "/var/www/sites/trytha/gluon/packages/dal/pydal/base.py", line 
>> 817, in define_table
>>     table = self.lazy_define_table(tablename,*fields,**args)
>>   File "/var/www/sites/trytha/gluon/packages/dal/pydal/base.py", line 
>> 856, in lazy_define_table
>>     polymodel=polymodel)
>>   File "/var/www/sites/trytha/gluon/packages/dal/pydal/adapters/base.py", 
>> line 491, in create_table
>>     fake_migrate=fake_migrate
>>   File "/var/www/sites/trytha/gluon/packages/dal/pydal/adapters/base.py", 
>> line 604, in migrate_table
>>     self.execute(sub_query)
>>   File "/var/www/sites/trytha/gluon/packages/dal/pydal/adapters/base.py", 
>> line 1326, in execute
>>     return self.log_execute(*a, **b)
>>   File "/var/www/sites/trytha/gluon/packages/dal/pydal/adapters/base.py", 
>> line 1320, in log_execute
>>     ret = self.cursor.execute(command, *a[1:], **b)
>>   File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 
>> 205, in execute
>>     self.errorhandler(self, exc, value)
>>   File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", 
>> line 36, in defaulterrorhandler
>>     raise errorclass, errorvalue
>> ProgrammingError: (1146, "Table 'trytha$test.restaurants' doesn't exist")
>>
>>
>> Since this works at home, it's obviously a pythonanywhere problem, but 
>> they requested I ask you guys for help troubleshooting it.
>>
>> So here's my question:  Anyone know a good web hosting company for 
>> Web2py?  I really just need vanilla Ubuntu on a server.  Alternatively, if 
>> you can figure out the error, that might work too, but given 
>> pythonanywhere's weird MySQL requirement of having your username as part of 
>> your DB name caused an hour of annoyance when I set everything up the first 
>> time, I'm not keen on giving them many more chances.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to