Re: [web2py] Which 4 or 2?

2020-04-18 Thread David Swarbrick
Thank you for the encouragement, and the really useful resources identified.

I think I have to work through the book, and where something really is not
understandable (for me), keep going back a few pages and trying again.


David Swarbrick da...@swarb.co.uk - dsw...@gmail.com - swarb.co.uk Tel 0795
457 9992 / +44(0)1484 380326



On Sat, 18 Apr 2020 at 07:35, AGRogers  wrote:

> Hi David
>
> I have spent that last month and a half trying to learn web2py and python
> and javascript (and css and sqlite and html). I reckon the official web2py
> book has everything in it that you need. However my trouble was that my
> knowledge about everything was so minimal that i often couldn't connect the
> dots. So i found other resources, especially Anthony's many posts on
> stackoverflow, invaluable.
>
> Anyhow, i started collecting links to helpful web2py posts and sites and
> noted them in this document:
> https://docs.google.com/document/d/1H6oqWAE6jv0R1HuOEamJkP91f8dPfYURLiMHhuiQTWQ/edit?usp=sharing
>
> The document is ugly but it might be a good place to start when you are
> looking for more info.
>
> I think the thing the official book lacks is sufficient examples. The
> information in it is great and quite complete. But i wasnt smart enough to
> work through my problems without more explicit examples.  For example, i
> found this site recently and it has a pile of really helpful query
> examples: https://web2py.wordpress.com/tag/subquery/
>
> Apart from this group, most of the stuff online for web2py is pretty old.
> But dont be put off by that, it almost always works perfectly.
>
> On Sat, 18 Apr 2020 at 15:13, David Swarbrick  wrote:
>
>> Thank you. I will persist.
>>
>> I used to tell my staff that the only daft question was the one unasked.
>> I may be providing a constant supply of evidence to the contrary.
>>
>> On Friday, 17 April 2020 21:52:24 UTC+1, Christian Varas wrote:
>>>
>>> Hi,
>>>
>>> I think is better to start with *web2py*, is easy to learn and I
>>> believe that fit better to your site, py4web is really good and more
>>> faster, but in web2py you have more tools to do things.
>>> The transition after from web2py to py4web is not difficult.
>>>
>>> Cheers.
>>> Chris.
>>>
>>> El vie., 17 abr. 2020 a las 16:02, David Swarbrick ()
>>> escribió:
>>>
 I have a UK case law database presently viewable at swarb.co.uk. The
 output is via WordPress. In better times we have had over 30k page views in
 a day. Presently I maintain it entirely using an ancient MS Access
 database.
 I need to move to a point where I have a sustainable and up to date
 editing. All that is local at the moment, and SQLite seems an appropriate
 starting point. W2P and P4W seem to offer ideal ways forward. I am a
 retired lawyer with some historic programming skills, not a developer. I
 tend to find modern programming documentation dense, and most of my time
 and attention has to go on content.

 Is P4W ready yet for a dumbo?  Is there an obvious transition from W2P
 to p4W?

 Where do I start?

 In any event, congratulations and thank yu.



 --
 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 web...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/web2py/702249ab-643c-496c-8a91-2db2ae775ab6%40googlegroups.com
 
 .

>>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/2b81d34b-0038-4165-bcd8-4e458fcf16e6%40googlegroups.com
>> 
>> .
>>
> --
> 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

Re: [web2py] Which 4 or 2?

2020-04-18 Thread Lovedie JC
Check out the video tutorials on vimeo as well.
They're great
Regards

On Sat, Apr 18, 2020, 11:11 David Swarbrick  wrote:

> Thank you for the encouragement, and the really useful resources
> identified.
>
> I think I have to work through the book, and where something really is not
> understandable (for me), keep going back a few pages and trying again.
>
>
> David Swarbrick da...@swarb.co.uk - dsw...@gmail.com - swarb.co.uk Tel
> 0795 457 9992 / +44(0)1484 380326
>
>
>
> On Sat, 18 Apr 2020 at 07:35, AGRogers  wrote:
>
>> Hi David
>>
>> I have spent that last month and a half trying to learn web2py and python
>> and javascript (and css and sqlite and html). I reckon the official web2py
>> book has everything in it that you need. However my trouble was that my
>> knowledge about everything was so minimal that i often couldn't connect the
>> dots. So i found other resources, especially Anthony's many posts on
>> stackoverflow, invaluable.
>>
>> Anyhow, i started collecting links to helpful web2py posts and sites and
>> noted them in this document:
>> https://docs.google.com/document/d/1H6oqWAE6jv0R1HuOEamJkP91f8dPfYURLiMHhuiQTWQ/edit?usp=sharing
>>
>> The document is ugly but it might be a good place to start when you are
>> looking for more info.
>>
>> I think the thing the official book lacks is sufficient examples. The
>> information in it is great and quite complete. But i wasnt smart enough to
>> work through my problems without more explicit examples.  For example, i
>> found this site recently and it has a pile of really helpful query
>> examples: https://web2py.wordpress.com/tag/subquery/
>>
>> Apart from this group, most of the stuff online for web2py is pretty old.
>> But dont be put off by that, it almost always works perfectly.
>>
>> On Sat, 18 Apr 2020 at 15:13, David Swarbrick  wrote:
>>
>>> Thank you. I will persist.
>>>
>>> I used to tell my staff that the only daft question was the one
>>> unasked.  I may be providing a constant supply of evidence to the contrary.
>>>
>>> On Friday, 17 April 2020 21:52:24 UTC+1, Christian Varas wrote:

 Hi,

 I think is better to start with *web2py*, is easy to learn and I
 believe that fit better to your site, py4web is really good and more
 faster, but in web2py you have more tools to do things.
 The transition after from web2py to py4web is not difficult.

 Cheers.
 Chris.

 El vie., 17 abr. 2020 a las 16:02, David Swarbrick ()
 escribió:

> I have a UK case law database presently viewable at swarb.co.uk. The
> output is via WordPress. In better times we have had over 30k page views 
> in
> a day. Presently I maintain it entirely using an ancient MS Access
> database.
> I need to move to a point where I have a sustainable and up to date
> editing. All that is local at the moment, and SQLite seems an appropriate
> starting point. W2P and P4W seem to offer ideal ways forward. I am a
> retired lawyer with some historic programming skills, not a developer. I
> tend to find modern programming documentation dense, and most of my time
> and attention has to go on content.
>
> Is P4W ready yet for a dumbo?  Is there an obvious transition from W2P
> to p4W?
>
> Where do I start?
>
> In any event, congratulations and thank yu.
>
>
>
> --
> 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 web...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/702249ab-643c-496c-8a91-2db2ae775ab6%40googlegroups.com
> 
> .
>
 --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/2b81d34b-0038-4165-bcd8-4e458fcf16e6%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2p

[web2py] {{block head}}{{end}}

2020-04-18 Thread 'Annet' via web2py-users
What is the use of:

{{block head}}{{end}}

{{block page_js}}{{end page_js}}

In layout.html

I expected something like this:


{{block head}}
  all head elements here
{{end}}


But I obviously didn't get it :-(


Kind regards,

Annet

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3eac4222-161e-45fc-86d3-c565c53bebbb%40googlegroups.com.


[web2py] Visual Studio Code

2020-04-18 Thread Andrea Fae'
How to use visual Studio Code like IDE and debugger for the last version of 
web2py? thank you

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/55617e7b-de4f-486d-b578-7ed859c799ae%40googlegroups.com.


[web2py] Re: Open form action in new window/tab only when validation passed

2020-04-18 Thread 'Yan Wong' via web2py-users
I think I've worked out what I *want* to do, but I'm not sure if this is 
easy in web2py. I want to use the onsubmit handler in a form to reload the 
form from a .load view, but return false so that the *final* submit action 
is not called. Then, if the reloaded form validates, I can set response.js 
in the loaded view to actually call .submit() on the form. As I understand, 
this will *not* trigger the onsubmit event 
, 
but it will go to the url specified in the action. That way I can do, e.g.


...




and only if the form validates will clicking [submit] open up a new tab 
containing some_other_url. Otherwise, the form will be reloaded in-situ 
using AJAX. Is this a reasonable way to proceed, and is there any web2py 
magic that I could use to help with this? Or will I need to code by hand 
all the AJAX reloading in the `reload_form()` function shown above, risking 
duplicating the web2py LOAD() functionality?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2a3f5890-76ad-40d8-90d5-7deba21cc387%40googlegroups.com.


[web2py] How do i get mu download function to download my image with its original name

2020-04-18 Thread mostwanted
I want to download an image but i want it to download with its originally 
saved name, is there a way I can modify my download function to do this? So 
far its downloading properly as desired its just that its renaming images 
with dates e.g:
* (IMG-20200418-WA0002)*

*IMAGE BEING DOWNLOADED*

{{for details in details:}}



{{=details.name}} *Download Image*
{{=details.place}}

{{pass}}


*DOWNLOAD FUNCTION*
def download():
return response.download(request, db)

Regards;

Mostwanted

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f517ac5e-c931-42d3-980e-b493789e7b33%40googlegroups.com.


[web2py] Re: Getting an error that ends in "No driver of supported ones %s is available" % str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) is available

2020-04-18 Thread Valdeck Rowe
So I checked gluon/contrib and it wasn't there, so I moved it into 
gluon/contrib. Restarted nginx. Still getting the same error.

On Thursday, April 16, 2020 at 3:57:53 PM UTC-5, Dave S wrote:
>
>
>
> On Wednesday, April 15, 2020 at 4:52:50 PM UTC-7, Valdeck Rowe wrote:
>>
>> I've copied the psycopg2 package over to the web2py/site-packages folder, 
>> added the packages folder to the path. Still nothing
>>
>>
> My copy isn't in site-packages, it's in gluon/contrib.
>  
>
>> On Tuesday, April 14, 2020 at 12:58:14 PM UTC-5, Valdeck Rowe wrote:
>>>
>>> Greetings,
>>>
>>> Got this error on a production Centos 7 box (on an intranet) after 
>>> running the centos setup script (setup-web2py-nginx-uwsgi-centos7.sh) to 
>>> update web2py before updating the application.
>>>
>>> Full error message: 
>>>  Failure to connect, tried 5 times: 
>>> Traceback (most recent call last): File 
>>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/base.py", line 507, in 
>>> __init__ self._adapter = adapter(**kwargs) File 
>>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
>>> line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) File 
>>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/__init__.py", 
>>> line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args, 
>>> **kwargs) File 
>>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
>>> line 67, in __init__ after_connection, File 
>>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
>>> 417, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs) File 
>>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
>>> 85, in __init__ self.find_driver() File 
>>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
>>> 134, in find_driver "No driver of supported ones %s is available" % 
>>> str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) 
>>> is available 
>>>
>>>
>>>
>>> Pysocpg2 is already installed. The app was working before.
>>>
>>> Not sure why I'm getting this error when I'd been running fine before.
>>>
>>> Please help. The server has not been used in days and this is mission 
>>> critical.
>>>
>>> Thanks in advance.
>>> Valdeck
>>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/831c08af-7eaa-4963-ae3d-3b809b4fc863%40googlegroups.com.


Re: [web2py] Re: Getting an error that ends in "No driver of supported ones %s is available" % str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) is available

2020-04-18 Thread Lovedie JC
I once had the same error,
Updated Web2py then copied the psycopg2 in the modules folder.
It worked for me.
Regards

On Sat, Apr 18, 2020, 19:09 Valdeck Rowe  wrote:

> So I checked gluon/contrib and it wasn't there, so I moved it into
> gluon/contrib. Restarted nginx. Still getting the same error.
>
> On Thursday, April 16, 2020 at 3:57:53 PM UTC-5, Dave S wrote:
>>
>>
>>
>> On Wednesday, April 15, 2020 at 4:52:50 PM UTC-7, Valdeck Rowe wrote:
>>>
>>> I've copied the psycopg2 package over to the web2py/site-packages
>>> folder, added the packages folder to the path. Still nothing
>>>
>>>
>> My copy isn't in site-packages, it's in gluon/contrib.
>>
>>
>>> On Tuesday, April 14, 2020 at 12:58:14 PM UTC-5, Valdeck Rowe wrote:

 Greetings,

 Got this error on a production Centos 7 box (on an intranet) after
 running the centos setup script (setup-web2py-nginx-uwsgi-centos7.sh) to
 update web2py before updating the application.

 Full error message:
  Failure to connect, tried 5 times:
 Traceback (most recent call last): File
 "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/base.py", line 507, in
 __init__ self._adapter = adapter(**kwargs) File
 "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
 line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) File
 "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
 line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args,
 **kwargs) File
 "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
 line 67, in __init__ after_connection, File
 "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line
 417, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs) File
 "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line
 85, in __init__ self.find_driver() File
 "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line
 134, in find_driver "No driver of supported ones %s is available" %
 str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',)
 is available



 Pysocpg2 is already installed. The app was working before.

 Not sure why I'm getting this error when I'd been running fine before.

 Please help. The server has not been used in days and this is mission
 critical.

 Thanks in advance.
 Valdeck

>>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/831c08af-7eaa-4963-ae3d-3b809b4fc863%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAcHJF_zm0Vm4D1%2B5NaDmQPZ1LAtWV6aqasbQg7imNoiLXCxEQ%40mail.gmail.com.


[web2py] Creating cookie if not present and modify it if present

2020-04-18 Thread Jon Subscripted
Hi everyone,
I'm facing some problems handling cookies. I need to store and update a
value for non-auth users.
I need to do it throughout the session (this could be done with session
cookies) but also between different sessions. That's why I decided to use
cookies.

I tried to follow web2py books' instructions (
http://www.web2py.com/books/default/chapter/29/04/the-core#Cookies ), but
it does not work as expected.

My problem is that I just succeed to set the cookie value properly the
first time. My guess is that I do not fully understand the request/response


if not request.cookies.has_key('elocookie'):
logger.debug("create ELO cookie")
response.cookies['elocookie'] = (MU,PHI,SIGMA)
response.cookies['elocookie']['expires'] = 72 * 3600
response.cookies['elocookie']['path'] = '/'
else:
value = request.cookies['elocookie'].value
logger.debug('read ELO cookie %s'%str(value))
mu,phi,sigma = [float(v) for v in
value.replace('(','').replace(')','').split(',')]


logger.debug("retrieved elo %s %s %s"%(mu,phi,sigma))
... #calculate mu,phi,sigma

response.cookies['elocookie'] = (mu,phi,sigma)

logger.debug("new cookie elo %s %s %s"%(mu,phi,sigma))


Could anyone tell me what I missed or misunderstood?
Thanks, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32MinQjzboTAe8k8LHnL9aMurh1LjMe3_YdyBgeo-WhUg%40mail.gmail.com.


Re: [web2py] Re: Getting an error that ends in "No driver of supported ones %s is available" % str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) is available

2020-04-18 Thread Valdeck Rowe

Thanks, will try this and let you know how it goes.

On Saturday, April 18, 2020 at 12:15:35 PM UTC-5, Lovedie JC wrote:
>
> I once had the same error,
> Updated Web2py then copied the psycopg2 in the modules folder.
> It worked for me. 
> Regards 
>
> On Sat, Apr 18, 2020, 19:09 Valdeck Rowe > 
> wrote:
>
>> So I checked gluon/contrib and it wasn't there, so I moved it into 
>> gluon/contrib. Restarted nginx. Still getting the same error.
>>
>> On Thursday, April 16, 2020 at 3:57:53 PM UTC-5, Dave S wrote:
>>>
>>>
>>>
>>> On Wednesday, April 15, 2020 at 4:52:50 PM UTC-7, Valdeck Rowe wrote:

 I've copied the psycopg2 package over to the web2py/site-packages 
 folder, added the packages folder to the path. Still nothing


>>> My copy isn't in site-packages, it's in gluon/contrib.
>>>  
>>>
 On Tuesday, April 14, 2020 at 12:58:14 PM UTC-5, Valdeck Rowe wrote:
>
> Greetings,
>
> Got this error on a production Centos 7 box (on an intranet) after 
> running the centos setup script (setup-web2py-nginx-uwsgi-centos7.sh) to 
> update web2py before updating the application.
>
> Full error message: 
>  Failure to connect, tried 5 times: 
> Traceback (most recent call last): File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/base.py", line 507, in 
> __init__ self._adapter = adapter(**kwargs) File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
> line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) 
> File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/__init__.py", 
> line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args, 
> **kwargs) File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
> line 67, in __init__ after_connection, File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
> 417, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs) File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
> 85, in __init__ self.find_driver() File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
> 134, in find_driver "No driver of supported ones %s is available" % 
> str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) 
> is available 
>
>
>
> Pysocpg2 is already installed. The app was working before.
>
> Not sure why I'm getting this error when I'd been running fine before.
>
> Please help. The server has not been used in days and this is mission 
> critical.
>
> Thanks in advance.
> Valdeck
>
 -- 
>> 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 web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/831c08af-7eaa-4963-ae3d-3b809b4fc863%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d0bcbba5-7a0c-407f-9a3b-5988ea5a31bf%40googlegroups.com.


Re: [web2py] Re: Getting an error that ends in "No driver of supported ones %s is available" % str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) is available

2020-04-18 Thread Valdeck Rowe
Did not work for me. I wonder what I might be missing.

On Saturday, April 18, 2020 at 2:25:54 PM UTC-5, Valdeck Rowe wrote:
>
>
> Thanks, will try this and let you know how it goes.
>
> On Saturday, April 18, 2020 at 12:15:35 PM UTC-5, Lovedie JC wrote:
>>
>> I once had the same error,
>> Updated Web2py then copied the psycopg2 in the modules folder.
>> It worked for me. 
>> Regards 
>>
>> On Sat, Apr 18, 2020, 19:09 Valdeck Rowe  wrote:
>>
>>> So I checked gluon/contrib and it wasn't there, so I moved it into 
>>> gluon/contrib. Restarted nginx. Still getting the same error.
>>>
>>> On Thursday, April 16, 2020 at 3:57:53 PM UTC-5, Dave S wrote:



 On Wednesday, April 15, 2020 at 4:52:50 PM UTC-7, Valdeck Rowe wrote:
>
> I've copied the psycopg2 package over to the web2py/site-packages 
> folder, added the packages folder to the path. Still nothing
>
>
 My copy isn't in site-packages, it's in gluon/contrib.
  

> On Tuesday, April 14, 2020 at 12:58:14 PM UTC-5, Valdeck Rowe wrote:
>>
>> Greetings,
>>
>> Got this error on a production Centos 7 box (on an intranet) after 
>> running the centos setup script (setup-web2py-nginx-uwsgi-centos7.sh) to 
>> update web2py before updating the application.
>>
>> Full error message: 
>>  Failure to connect, tried 5 times: 
>> Traceback (most recent call last): File 
>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/base.py", line 507, in 
>> __init__ self._adapter = adapter(**kwargs) File 
>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
>> line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) 
>> File 
>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/__init__.py", 
>> line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args, 
>> **kwargs) File 
>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
>> line 67, in __init__ after_connection, File 
>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 
>> 417, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs) File 
>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 
>> 85, in __init__ self.find_driver() File 
>> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 
>> 134, in find_driver "No driver of supported ones %s is available" % 
>> str(self.drivers) RuntimeError: No driver of supported ones 
>> ('psycopg2',) 
>> is available 
>>
>>
>>
>> Pysocpg2 is already installed. The app was working before.
>>
>> Not sure why I'm getting this error when I'd been running fine before.
>>
>> Please help. The server has not been used in days and this is mission 
>> critical.
>>
>> Thanks in advance.
>> Valdeck
>>
> -- 
>>> 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 web...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/web2py/831c08af-7eaa-4963-ae3d-3b809b4fc863%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0206451f-d712-4a8a-858e-caf1610bf8f3%40googlegroups.com.


[web2py] Re: Getting an error that ends in "No driver of supported ones %s is available" % str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) is available

2020-04-18 Thread Valdeck Rowe
Is it possible for me to use the pg8000 driver?

On Tuesday, April 14, 2020 at 12:58:14 PM UTC-5, Valdeck Rowe wrote:
>
> Greetings,
>
> Got this error on a production Centos 7 box (on an intranet) after running 
> the centos setup script (setup-web2py-nginx-uwsgi-centos7.sh) to update 
> web2py before updating the application.
>
> Full error message: 
>  Failure to connect, tried 5 times: 
> Traceback (most recent call last): File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/base.py", line 507, in 
> __init__ self._adapter = adapter(**kwargs) File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
> line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/__init__.py", 
> line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args, 
> **kwargs) File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/postgres.py", 
> line 67, in __init__ after_connection, File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
> 417, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs) File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
> 85, in __init__ self.find_driver() File 
> "/opt/web2py_apps/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
> 134, in find_driver "No driver of supported ones %s is available" % 
> str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) 
> is available 
>
>
>
> Pysocpg2 is already installed. The app was working before.
>
> Not sure why I'm getting this error when I'd been running fine before.
>
> Please help. The server has not been used in days and this is mission 
> critical.
>
> Thanks in advance.
> Valdeck
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b3c36cda-09d9-4ed7-ae5c-25faf0ffc03d%40googlegroups.com.