Derek is right. If you have any controller or model or module that performs 
a chdir, that will move the entire web2py to the new dir and break 
everything. I am not saying this is the cause of the problem, but could be 
an explanations. Web2py apps should not perform thread-unsafe operations 
like chdir.


On Monday, 5 May 2014 17:28:03 UTC-5, Marin Pranjić wrote:
>
> File can't just dissapear in the middle of transaction :)
> And my table is not called main.message anyway.
> And it's not blank, I have data stored in there that I can read.
> I can't write into one specific table. Other tables work.
>
> Marin
>
>
> On Tue, May 6, 2014 at 12:21 AM, Derek <sp1d...@gmail.com> wrote:
>
>> well, it will be fine until it can't find the file, creates it again 
>> blank.
>>
>>
>> http://stackoverflow.com/questions/14262771/why-am-i-suddenly-getting-operationalerror-no-such-table
>>
>>
>> On Monday, May 5, 2014 3:12:31 PM UTC-7, Marin Pranjić wrote:
>>
>>>  default DAL configuration that is shipped with welcome app.
>>> I also searched for solution but didn't find anything.
>>>
>>> sqlite path is fine. There are at least 10 queries in the same 
>>> transaction before this one breaks.
>>> i have no idea what's wrong...
>>>
>>>
>>> On Mon, May 5, 2014 at 11:40 PM, Derek <sp1...@gmail.com> wrote:
>>>
>>>> What I've read says that you need to specify the full path to the 
>>>> sqlite data file or you will get this error. What's your db.py look like?
>>>>
>>>>
>>>> On Monday, May 5, 2014 12:31:35 AM UTC-7, Marin Pranjić wrote:
>>>>
>>>>> I copied "broken" database locally so I can test it.
>>>>> I also added print 
>>>>> here<https://github.com/web2py/web2py/blob/master/gluon/dal.py#L1353>to 
>>>>> get actual queries.
>>>>>
>>>>> Queries are fine. Actually if I just c/p those queries into SQLite 
>>>>> Database Browser, it works (on the same database file).
>>>>>
>>>>> So it's not web2py, it's not sqlite, but it doesn't work.
>>>>>
>>>>> -__-
>>>>>
>>>>>
>>>>>
>>>>> On Mon, May 5, 2014 at 9:05 AM, Marin Pranjić <marin....@gmail.com>wrote:
>>>>>
>>>>>> Well, nothing unusual with my table definitions. Everything by the 
>>>>>> specs.
>>>>>>  I just removed all .table files and started with new sqlite file, 
>>>>>> and that problem is gone.
>>>>>> (i still have copies)
>>>>>>
>>>>>> Seems that files were stuck in some state.
>>>>>>
>>>>>> However, main.message error still confuses me, because sql query 
>>>>>> that's created by DAL is valid.
>>>>>> And this happens even after migrations are fixed.
>>>>>>
>>>>>> So it's probably SQLite that's broken/corrupted and I'm not sure if 
>>>>>> those issues are somehow related.
>>>>>>
>>>>>> Marin
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sun, May 4, 2014 at 8:58 PM, Niphlod <nip...@gmail.com> wrote:
>>>>>>
>>>>>>> how are your table defined ? the fact that 'main.message' gets into 
>>>>>>> the error seems a little weird for a table named "message_receiver". 
>>>>>>> Also, 
>>>>>>> that "success" repeated into sql.log means that something really 
>>>>>>> strange is 
>>>>>>> going on with your migrations.
>>>>>>>
>>>>>>>
>>>>>>> On Sunday, May 4, 2014 3:22:19 PM UTC+2, Marin Pranjić wrote:
>>>>>>>
>>>>>>>> To confirm...
>>>>>>>> https://github.com/web2py/web2py/blob/master/gluon/dal.py#L1262
>>>>>>>>
>>>>>>>> This gets executed on every request.
>>>>>>>>
>>>>>>>> However I still don't understand why sqlite fails on insert.
>>>>>>>>
>>>>>>>> It fails on testing server but it works on my local instance.
>>>>>>>>
>>>>>>>> Marin
>>>>>>>>
>>>>>>>>
>>>>>>>>  On Sun, May 4, 2014 at 3:13 PM, Marin Pranjić <marin....@gmail.com
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>>  Hi.
>>>>>>>>>
>>>>>>>>> I have application hosted on EC2. It is a testing server. It's 
>>>>>>>>> like production environment except it uses SQLite.
>>>>>>>>>
>>>>>>>>> I have a table called message_receiver. When I fetch records (for 
>>>>>>>>> ex. in appadmin) it works, but when I try to insert something 
>>>>>>>>> (appadmin or 
>>>>>>>>> in-app) i get the following error:
>>>>>>>>>
>>>>>>>>> OperationalError: no such table: main.message
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I got the actual SQL query from the error ticket:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> INSERT INTO message_receiver(time_seen,user_id,message_id) VALUES 
>>>>>>>>> (NULL,93,1);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> That seems correct.
>>>>>>>>>
>>>>>>>>> However, I noticed that my sql.log is bigger than sqlite database 
>>>>>>>>> file. It has lots of "success!" messages inside.
>>>>>>>>> And it seems that migration for some tables is triggered on every 
>>>>>>>>> request but nothing changes in .table files.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> There are 6 tables that are affected by migration but I don't see a 
>>>>>>>>> pattern.
>>>>>>>>>
>>>>>>>>> Can someone suggest how to trace/debug this?
>>>>>>>>>
>>>>>>>>>  -- 
>>>>>>>>> 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 web2py+un...@googlegroups.com.
>>>>>>>>>
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>>
>>>>>>>>  -- 
>>>>>>> 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 web2py+un...@googlegroups.com.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>  -- 
>>>> 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 web2py+un...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  -- 
>> 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 web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to