sqlite database files corrupted?

45 views
Skip to first unread message

P Page-McCaw

unread,
Mar 17, 2016, 3:55:05 PM3/17/16
to web2py-users
I have a pretty simple web2py application that inputs information about academic seminars and then displays the seminar notices on our departmental home page. It is called, creatively, SeminarCalendar. This is hosted by pythonanywhere. It has all of 4 tables. 3 of which have 3 fields or fewer. It gets very little traffic, a big day might be 1000 hits.

Yesterday, I was playing around with a different application, Lines, hosted within the same web2py "site". This will be important. Today SeminarCalendar is throwing error tickets for the first time and I can't figure out what happened. I can't get into the database administration functions, it throws the same error: 

<type 'exceptions.ValueError'> insecure string pickle

with the error showing up in the format line of the last table. Remark that line and the error gets thrown from the previous line. The function in base.py that throws the error changes, no surprise. I wasn't aware of pickling anything, something internal and way past my abilities. Sorry, to be pathetic here.

So, I Pack All and run the app on locally. I can edit the app, db.py has the 4 tables etc, but again not see the sqlite database. I also can not serve pages from it (other apps work fine). The error is 'can not establish a secure connection to the server'. 

When I inspect the databases folder I find that there are tables (5 .table files, each almost a year old) that belong to Lines, not to SeminarCalendar. And since Lines is a dangerously messy playground, I must have bad links and data, which is presumably why pickle is bailing.  No note in the sql log. No obvious errors. The last row added to the SeminarCalendar is one I added and the data looks to be fine. 

So I guess I have a bunch of related questions: 
First, what is the best way to fix this! These tables are small and the included data is not critical, but...
Second, what on earth did I do to get tables from one app mixed in with tables from another app? I'd like to avoid this in the future! (Very embarrassing to have the Chair look at the page and ask what Error ticket means!)
Third, as a biologist, not a programmer, should I not be messing around with web2py? If I've missed something really obvious, I think I should go back to my test tubes. It was remarkable how 'easy' it was to set this app up. And what an improvement it was over what the Universities equivalent was.

Dave S

unread,
Mar 17, 2016, 7:55:55 PM3/17/16
to web2py-users
On Thursday, March 17, 2016 at 12:55:05 PM UTC-7, P Page-McCaw wrote:
I have a pretty simple web2py application that inputs information about academic seminars and then displays the seminar notices on our departmental home page. It is called, creatively, SeminarCalendar. This is hosted by pythonanywhere. It has all of 4 tables. 3 of which have 3 fields or fewer. It gets very little traffic, a big day might be 1000 hits.
[...] 
So I guess I have a bunch of related questions: 
First, what is the best way to fix this! These tables are small and the included data is not critical, but...
Second, what on earth did I do to get tables from one app mixed in with tables from another app? I'd like to avoid this in the future! (Very embarrassing to have the Chair look at the page and ask what Error ticket means!)
Third, as a biologist, not a programmer, should I not be messing around with web2py? If I've missed something really obvious, I think I should go back to my test tubes. It was remarkable how 'easy' it was to set this app up. And what an improvement it was over what the Universities equivalent was.

 
For the first 2 questions, it will be helpful if you tell us what OS your web2py is running under, and if a network drive (or "share") is involved.

That said, I have never had the problem of files from one application interfering with another, but most of my "multiple application" servers are really only serving one application except for a few experimental accesses.

For the 3rd question, I'd say that web2py is a better environment for beginners than most environments are.  You should be able to manage both your test tubes and a simple site. The only way to be safer (in the "I'm not a programmer and don't play one on TV" sense) that I know of would be to do one of those sites the phone companies seem to be pushing, where you don't do much more than paste text and upload pictures.

/dps


Reply all
Reply to author
Forward
0 new messages