Re: [web2py] Re: Problem tranfering to a new database...
I was looking at dal.py and it seems to me, that it wants all the tables first in my DAL object, and will not create them. Just import them and if they don't exist it throws an error. It will take some time to create the database here but let's see if this fixes the problem. If so, a better error message for this issue could be created. BR, Jason On 05/24/2012 07:15 AM, Jason Brower wrote: I got the connection to work. However, it's now throwing the same error as before. Dang. This is on a blank database to csv. Attached... On 05/24/2012 12:54 AM, pbreit wrote: It might. Can you try with an empty DB? On Wednesday, May 23, 2012 10:50:48 AM UTC-7, encompass wrote: Would having an empty table raise this error? On 05/23/2012 08:14 PM, pbreit wrote: > Apparently choking on this line: > > elif not line.startswith('TABLE ') or not line[6:] in > self.tables: > raise SyntaxError, 'invalid file format' > > Does your file look OK when taking this into consideration? > > Hard to think linefeeds are the problem but you could try saving the > file in the various formats (Unix, Windows, Mac).
Re: [web2py] Re: Problem tranfering to a new database...
I got the connection to work. However, it's now throwing the same error as before. Dang. This is on a blank database to csv. Attached... On 05/24/2012 12:54 AM, pbreit wrote: It might. Can you try with an empty DB? On Wednesday, May 23, 2012 10:50:48 AM UTC-7, encompass wrote: Would having an empty table raise this error? On 05/23/2012 08:14 PM, pbreit wrote: > Apparently choking on this line: > > elif not line.startswith('TABLE ') or not line[6:] in > self.tables: > raise SyntaxError, 'invalid file format' > > Does your file look OK when taking this into consideration? > > Hard to think linefeeds are the problem but you could try saving the > file in the various formats (Unix, Windows, Mac). TABLE auth_user TABLE auth_group TABLE auth_membership TABLE auth_permission TABLE auth_event TABLE auth_cas TABLE event TABLE floor_plan TABLE advertisement TABLE advertisement_action TABLE advertiser_credit TABLE attachment TABLE attender_appointment TABLE booth TABLE event_attender TABLE event_connection TABLE event_sponsor TABLE happening TABLE happening_attender TABLE iid_mail TABLE invitation TABLE outbox TABLE tag TABLE tag_advertisement TABLE tag_link TABLE wiki_page END
Re: [web2py] Re: Problem tranfering to a new database...
When I emptied my database locally and tried to connect to the server remotely I get ProgrammingError: ('FATAL','28000','no pg_hba.conf entry for host "85.23.56.232", user "postgres", database "postgres", SSL off') This is because I haven't setup this computer as a connectable host, I guess. Any idea how to connect to it. I am currently researching the ph_hba.conf file now to see if I can solve it myself. BR, Jason On 05/24/2012 12:54 AM, pbreit wrote: It might. Can you try with an empty DB? On Wednesday, May 23, 2012 10:50:48 AM UTC-7, encompass wrote: Would having an empty table raise this error? On 05/23/2012 08:14 PM, pbreit wrote: > Apparently choking on this line: > > elif not line.startswith('TABLE ') or not line[6:] in > self.tables: > raise SyntaxError, 'invalid file format' > > Does your file look OK when taking this into consideration? > > Hard to think linefeeds are the problem but you could try saving the > file in the various formats (Unix, Windows, Mac).
Re: [web2py] Re: Problem tranfering to a new database...
It might. Can you try with an empty DB? On Wednesday, May 23, 2012 10:50:48 AM UTC-7, encompass wrote: > > Would having an empty table raise this error? > > On 05/23/2012 08:14 PM, pbreit wrote: > > Apparently choking on this line: > > > > elif not line.startswith('TABLE ') or not line[6:] in > > self.tables: > > raise SyntaxError, 'invalid file format' > > > > Does your file look OK when taking this into consideration? > > > > Hard to think linefeeds are the problem but you could try saving the > > file in the various formats (Unix, Windows, Mac). > >
Re: [web2py] Re: Problem tranfering to a new database...
Would having an empty table raise this error? On 05/23/2012 08:14 PM, pbreit wrote: Apparently choking on this line: elif not line.startswith('TABLE ') or not line[6:] in self.tables: raise SyntaxError, 'invalid file format' Does your file look OK when taking this into consideration? Hard to think linefeeds are the problem but you could try saving the file in the various formats (Unix, Windows, Mac).
[web2py] Re: Problem tranfering to a new database...
Apparently choking on this line: elif not line.startswith('TABLE ') or not line[6:] in self.tables: raise SyntaxError, 'invalid file format' Does your file look OK when taking this into consideration? Hard to think linefeeds are the problem but you could try saving the file in the various formats (Unix, Windows, Mac).