[web2py] Re: web2py -> py4web

2024-07-18 Thread xgp.l...@gmail.com
Hi Massimo.

At the moment I haven't moved to py4web. I would like you to consider 
support for web2py until python 3.13 at least. I understand the hard work 
it takes, but keep in mind improvements on newer versions of python are 
worth it.

Only using python 3.10+ 
Not using GAE.


Thanks your hard work always.


El sábado, 13 de julio de 2024 a las 21:10:05 UTC-5, Massimo Di Pierro 
escribió:

> Hello everybody,
>
> You may have noticed I am not very active on this mailing list. That is 
> mostly because I have been concentrating my energy on py4web which I think 
> is must more modern and faster than web2py.
>
> Once again I want to encourage you to move.
> If you look at this page
>
>  https://py4web.com/#why
>
> You will find it to be very familiar:
> - has an admin interface (called _dashboard)
> - has an dbadmin interface
> - same pyDAL
> - same template language
> - same helpers
> - same session interface
> - similar but better Form
> - similar but better Grid (still evolving)
> - different request object but compatible with bottlepy
> - different auth logic but support for more Oauth2 services (github, okta, 
> facebook, etc.)
> - different but similar background scheduler
>
> Here are some instructions about how to move from web2py to py4web
>
> web2py currently works for python2.7 and python3.7+ but they are using a 
> frozen version of pydal. This no longer works on Google App Engine. So how 
> do we fix it?
>
> I am considering the following:
> - freezing web2py for Python 2.7 and stopping support.
> - continuing limited support of web2py for python3.7+ and specifically 
> upgrade pydal for the lastest. 
> - upgrade pydal so that it continues to work on Google App Engine for both 
> web2py and py4web.
>
> My questions are: Is this worth it? Have people moved from python2.7 to 
> 3.7+ already? Are people here interested in continuing to use web2py with 
> GAE?
>  
>
> Massimo
>
>
>
>

-- 
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/7cf4cdd3-e91e-413d-9cbf-66cb54b69e2dn%40googlegroups.com.


[web2py] Re: web2py 2.25.1

2023-10-18 Thread xgp.l...@gmail.com
Hi,

Modified the code to this:

  for k, v in iteritems(headers):
if isinstance(v, list):
rheaders += [(k, str(item)) for item in v]
else:
rheaders.append((k, str(v)))

This was the code from version 2.24.1

Dont know if this is correct.


Cheers,

El miércoles, 18 de octubre de 2023 a las 11:37:30 UTC-5, 
xgp.l...@gmail.com escribió:

> Hi Massimo,
>
> Getting this redirecting from nginx to uwsgi_pass http port.
>
> Traceback (most recent call last):
>   File "/home/www-data/web2py/gluon/main.py", line 562, in wsgibase
> return http_response.to(responder, env=env)
>   File "/home/www-data/web2py/gluon/http.py", line 129, in to
> responder(status, rheaders)
> TypeError: http header value must be a string
>
>
> Regards,
>
>
> El lunes, 9 de octubre de 2023 a las 3:38:11 UTC-5, CarlosDB escribió:
>
>> A fantastic job.
>> Thank you very much.
>>
>> Carlos.
>>
>> El domingo, 8 de octubre de 2023 a las 20:59:27 UTC+2, Massimo Di Pierro 
>> escribió:
>>
>>> Hello everybody,
>>>
>>> A new version of web2py, 2.25.1, is out. 
>>>
>>> It contains some bug fixes, #2468 #2468 #2236, http headers 
>>> sanitization, and fixes this vulenarbility 
>>> https://jvn.jp/en/jp/JVN80476432/ (to be published soon).
>>>
>>> The vulnerabily does not affect most users. It is only in the optional 
>>> MessageBoxHandler for logging when using Tkinter. I do know think anybody 
>>> is was using it.
>>>
>>> I am reviewing some old PRs and I may have another version out today 
>>> including those fixes as well. Sorry I have been slow but as you know, I am 
>>> spending more time on py4web than web2py these days. 
>>>
>>> Massimo
>>>
>>>
>>>

-- 
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/2499d89f-f635-4e82-915c-15acbee3550bn%40googlegroups.com.


[web2py] Re: web2py 2.25.1

2023-10-18 Thread xgp.l...@gmail.com
Hi Massimo,

Getting this redirecting from nginx to uwsgi_pass http port.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/main.py", line 562, in wsgibase
return http_response.to(responder, env=env)
  File "/home/www-data/web2py/gluon/http.py", line 129, in to
responder(status, rheaders)
TypeError: http header value must be a string


Regards,


El lunes, 9 de octubre de 2023 a las 3:38:11 UTC-5, CarlosDB escribió:

> A fantastic job.
> Thank you very much.
>
> Carlos.
>
> El domingo, 8 de octubre de 2023 a las 20:59:27 UTC+2, Massimo Di Pierro 
> escribió:
>
>> Hello everybody,
>>
>> A new version of web2py, 2.25.1, is out. 
>>
>> It contains some bug fixes, #2468 #2468 #2236, http headers sanitization, 
>> and fixes this vulenarbility https://jvn.jp/en/jp/JVN80476432/ (to be 
>> published soon).
>>
>> The vulnerabily does not affect most users. It is only in the optional 
>> MessageBoxHandler for logging when using Tkinter. I do know think anybody 
>> is was using it.
>>
>> I am reviewing some old PRs and I may have another version out today 
>> including those fixes as well. Sorry I have been slow but as you know, I am 
>> spending more time on py4web than web2py these days. 
>>
>> Massimo
>>
>>
>>

-- 
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/18c9bc90-183c-40a3-9640-6b9955e04463n%40googlegroups.com.


[web2py] Re: 3.11 issues

2023-09-14 Thread xgp.l...@gmail.com
Hi,

Now im running into other issues:

cannot import name 'FDPF' from 'fpdf' (unknown location) 
cannot import name 'num2words' from 'num2words' (unknown location)


Suggestions?

El jueves, 14 de septiembre de 2023 a las 21:34:01 UTC-5, 
xgp.l...@gmail.com escribió:

> I was able to get redis working using redis==4.5.1.
> The default pip install version was 5.0.0
>
>
> Cheers,
>
> El jueves, 14 de septiembre de 2023 a las 7:49:11 UTC-5, 
> xgp.l...@gmail.com escribió:
>
>> Hi,
>>
>> Im trying to run web2py + python3.11 + uwgi but unable to make it work.
>> Seems web2py can't import libraries, when doing the same over a python3 
>> prompt it works.
>>
>> Example:
>>
>>  Needs redis library to work 
>> try:
>> import redis
>> from redis.exceptions import WatchError as RWatchError
>> from redis.exceptions import ConnectionError as RConnectionError
>> except ImportError:
>> logger.error("Needs redis library to work")
>> raise RuntimeError('Needs redis library to work')
>> When running the same commands on a python3 prompt they run without issue.
>>
>> Libraries are installed.
>> # pip3 list
>> redis  5.0.0
>>
>> Change uwsgi plugin from python3 to python311 dont have any effect in the 
>> output.
>>
>> Any ideas,
>>
>>
>>

-- 
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/95103508-555f-4c1c-aaac-c7d79bc78ba3n%40googlegroups.com.


[web2py] Re: 3.11 issues

2023-09-14 Thread xgp.l...@gmail.com
I was able to get redis working using redis==4.5.1.
The default pip install version was 5.0.0


Cheers,

El jueves, 14 de septiembre de 2023 a las 7:49:11 UTC-5, xgp.l...@gmail.com 
escribió:

> Hi,
>
> Im trying to run web2py + python3.11 + uwgi but unable to make it work.
> Seems web2py can't import libraries, when doing the same over a python3 
> prompt it works.
>
> Example:
>
>  Needs redis library to work 
> try:
> import redis
> from redis.exceptions import WatchError as RWatchError
> from redis.exceptions import ConnectionError as RConnectionError
> except ImportError:
> logger.error("Needs redis library to work")
> raise RuntimeError('Needs redis library to work')
> When running the same commands on a python3 prompt they run without issue.
>
> Libraries are installed.
> # pip3 list
> redis  5.0.0
>
> Change uwsgi plugin from python3 to python311 dont have any effect in the 
> output.
>
> Any ideas,
>
>
>

-- 
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/cdcfd0f1-6759-4c83-89f2-2fce42d74e45n%40googlegroups.com.


[web2py] 3.11 issues

2023-09-14 Thread xgp.l...@gmail.com
Hi,

Im trying to run web2py + python3.11 + uwgi but unable to make it work.
Seems web2py can't import libraries, when doing the same over a python3 
prompt it works.

Example:

 Needs redis library to work 
try:
import redis
from redis.exceptions import WatchError as RWatchError
from redis.exceptions import ConnectionError as RConnectionError
except ImportError:
logger.error("Needs redis library to work")
raise RuntimeError('Needs redis library to work')
When running the same commands on a python3 prompt they run without issue.

Libraries are installed.
# pip3 list
redis  5.0.0

Change uwsgi plugin from python3 to python311 dont have any effect in the 
output.

Any ideas,


-- 
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/cbbc4799-c937-4683-a605-c93878b079efn%40googlegroups.com.


[web2py] Re: web2py 2.24.1 released

2023-03-23 Thread xgp.l...@gmail.com
Thank you Massimo!

El jueves, 23 de marzo de 2023 a las 0:20:20 UTC-5, Massimo Di Pierro 
escribió:

> Hello everybody,
>
> web2py 2.24.1 has been released.
>
> Thanks to Leonel, Cem, and Mark for bug fixes including:
> - handling corrupt disk cache
> - broken application packaging
> - compare function logic
>
>
>

-- 
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/2bf213ed-a33e-403b-9f33-527d3a0da1afn%40googlegroups.com.


[web2py] Re: deploy web2py with gunicorn, Nginx y HTTPS

2022-04-17 Thread xgp.l...@gmail.com
Hi all,

What are the advantages when using Gunicorn?


Cheers,

El domingo, 13 de septiembre de 2020 a las 17:15:40 UTC-5, jpa...@gmail.com 
escribió:

> Perfect. Gracias 
>
>
> El sábado, 12 de septiembre de 2020 a las 17:10:10 UTC+2, cabildocl 
> escribió:
>
>> I wrote an article in Spanish on how to deploy web2py with https
>>
>>
>> http://cabildocl.blogspot.com/2020/09/implementar-web2py-con-gunicorn-nginx-y.html
>>
>>
>>

-- 
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/79d1a2f6-1a7b-4839-b129-5bd75add1684n%40googlegroups.com.


[web2py] Re: Redis and Python3?

2021-05-01 Thread xgp.l...@gmail.com
Joe, thanks for this. 
I havent been able to port my app to py4web yet. So i have to step into 
python3 first.


Cheers,

El Friday, January 1, 2021 a la(s) 6:45:16 PM UTC-5, Joe Barnhart escribió:

> Here is a patch that restores redis3 sessions for my system.  I'm using 
> the latest web2py 2.21.1 and redis stable 6.0.9 (via brew)
>
> *diff --git a/gluon/contrib/redis_session.py 
> b/gluon/contrib/redis_session.py*
> *index 6413b52a..73c20422 100644*
> *--- a/gluon/contrib/redis_session.py*
> *+++ b/gluon/contrib/redis_session.py*
> *@@ -13,7 +13,7 @@ from gluon import current*
> * from gluon.storage import Storage*
> * from gluon.contrib.redis_utils import acquire_lock, release_lock*
> * from gluon.contrib.redis_utils import register_release_lock*
> *-from gluon._compat import to_native*
> *+from gluon._compat import to_native,to_bytes*
> * from datetime import datetime*
>  
> * logger = logging.getLogger("web2py.session.redis")*
> *@@ -208,7 +208,7 @@ class MockQuery(object):*
> * if rtn:*
> * if self.unique_key:*
> * # make sure the id and unique_key are correct*
> *-if rtn['unique_key'] == to_native(self.unique_key):*
> *+if rtn['unique_key'] == to_bytes(self.unique_key):*
> * rtn['update_record'] = self.update  # update 
> record support*
> * else:*
> * rtn = None*
>
>
> Does anyone know how to make code blocks in this new stupid Google Groups 
> window?  Sheesh.  One step sideways and three steps back.
>
> -- Joe
>
> On Wednesday, September 11, 2019 at 12:11:13 AM UTC-5 Massimo Di Pierro 
> wrote:
>
>> :-)
>>
>>
>> On Monday, 9 September 2019 22:40:36 UTC-7, Joe Barnhart wrote:
>>>
>>> ROFL!  I don't think it's quite ready for my prime-time cash-producing 
>>> website yet.  I'll definitely keep an eye on it and start playing around 
>>> with it.  I need to keep you from making any decisions I don't like, after 
>>> all!
>>>
>>> -- Joe
>>>
>>>
>>> On Monday, September 9, 2019 at 8:48:54 PM UTC-7, Massimo Di Pierro 
>>> wrote:

 py4web supports redis. Just saying. ;-)

 On Monday, 9 September 2019 09:27:20 UTC-7, Joe Barnhart wrote:
>
> I sure wish somebody could fix this.  It's a real bottleneck to 
> Python3 adoption for my site.  I tried using local storage for sessions 
> but 
> the limitation on data size makes it a no-go for my site.  If I can't use 
> redis I'll have to drop back to storing sessions in files and that really 
> sucks for a larger deployment.
>
> -- Joe
>
> On Monday, April 1, 2019 at 11:31:10 PM UTC-7, Massimo Di Pierro wrote:
>>
>> we could change True/False with 1/0 but a better approach would be to 
>> remove the value within the redis adapter. The value of locked does not 
>> do 
>> anything anyway on redis since it is not a relational database with 
>> transactions.
>>
>> On Sunday, 31 March 2019 10:19:20 UTC-7, Jim S wrote:
>>>
>>> I changed the following in gluon/globals.py and mine is working 
>>> now.  But, I'm unclear on how to test to see if it is handling the 
>>> locking 
>>> properly:
>>>
>>> dd = dict(locked=False,
>>>   client_ip=response.session_client,
>>>   modified_datetime=request.now,
>>>   session_data=session_pickled,
>>>   unique_key=unique_key)
>>>
>>> to 
>>>
>>> dd = dict(locked='False',
>>>   client_ip=response.session_client,
>>>   modified_datetime=str(request.now),
>>>   session_data=session_pickled,
>>>   unique_key=unique_key)
>>>
>>> This makes all my stuff work (I'm still on Python 2.7 but I think 
>>> the problem has to do with the python redis client moving to version 3).
>>>
>>> Leonel - I think this relates back to an issue you commented on late 
>>> last year.   
>>> https://groups.google.com/forum/?pli=1#!searchin/web2py/redis%7Csort:date/web2py/PdquGF_9a2E/6VJpLqsnBgAJ
>>>
>>> At that time I just continued using python redis 2.10.6.  But, can't 
>>> do that forever.  Anyone able to test or improve upon the change I made 
>>> above?  Like I said, it works for me, but I don't know how to see if 
>>> I'm 
>>> causing any other unforeseen damage.
>>>
>>> -Jim
>>>
>>> On Friday, March 29, 2019 at 7:49:03 PM UTC-5, Joe Barnhart wrote:

 Hi Leonel --

 My brain refuses to put together the words "session locked field". 
  I understand the part of pickle smashing the values and encoding them 
 as 
 one string.  The bool has something to do with session locking?  

 I've only looked at the web2py redis code in the most scant way as 
 I wasn't planning to become a redis expert.  Sessions in redis could 
 be 

[web2py] Re: Redis and Python3?

2021-05-01 Thread xgp.l...@gmail.com
Joe, were you able to apply this patch?


Cheers,

El Friday, January 1, 2021 a la(s) 6:45:16 PM UTC-5, Joe Barnhart escribió:

> Here is a patch that restores redis3 sessions for my system.  I'm using 
> the latest web2py 2.21.1 and redis stable 6.0.9 (via brew)
>
> *diff --git a/gluon/contrib/redis_session.py 
> b/gluon/contrib/redis_session.py*
> *index 6413b52a..73c20422 100644*
> *--- a/gluon/contrib/redis_session.py*
> *+++ b/gluon/contrib/redis_session.py*
> *@@ -13,7 +13,7 @@ from gluon import current*
> * from gluon.storage import Storage*
> * from gluon.contrib.redis_utils import acquire_lock, release_lock*
> * from gluon.contrib.redis_utils import register_release_lock*
> *-from gluon._compat import to_native*
> *+from gluon._compat import to_native,to_bytes*
> * from datetime import datetime*
>  
> * logger = logging.getLogger("web2py.session.redis")*
> *@@ -208,7 +208,7 @@ class MockQuery(object):*
> * if rtn:*
> * if self.unique_key:*
> * # make sure the id and unique_key are correct*
> *-if rtn['unique_key'] == to_native(self.unique_key):*
> *+if rtn['unique_key'] == to_bytes(self.unique_key):*
> * rtn['update_record'] = self.update  # update 
> record support*
> * else:*
> * rtn = None*
>
>
> Does anyone know how to make code blocks in this new stupid Google Groups 
> window?  Sheesh.  One step sideways and three steps back.
>
> -- Joe
>
> On Wednesday, September 11, 2019 at 12:11:13 AM UTC-5 Massimo Di Pierro 
> wrote:
>
>> :-)
>>
>>
>> On Monday, 9 September 2019 22:40:36 UTC-7, Joe Barnhart wrote:
>>>
>>> ROFL!  I don't think it's quite ready for my prime-time cash-producing 
>>> website yet.  I'll definitely keep an eye on it and start playing around 
>>> with it.  I need to keep you from making any decisions I don't like, after 
>>> all!
>>>
>>> -- Joe
>>>
>>>
>>> On Monday, September 9, 2019 at 8:48:54 PM UTC-7, Massimo Di Pierro 
>>> wrote:

 py4web supports redis. Just saying. ;-)

 On Monday, 9 September 2019 09:27:20 UTC-7, Joe Barnhart wrote:
>
> I sure wish somebody could fix this.  It's a real bottleneck to 
> Python3 adoption for my site.  I tried using local storage for sessions 
> but 
> the limitation on data size makes it a no-go for my site.  If I can't use 
> redis I'll have to drop back to storing sessions in files and that really 
> sucks for a larger deployment.
>
> -- Joe
>
> On Monday, April 1, 2019 at 11:31:10 PM UTC-7, Massimo Di Pierro wrote:
>>
>> we could change True/False with 1/0 but a better approach would be to 
>> remove the value within the redis adapter. The value of locked does not 
>> do 
>> anything anyway on redis since it is not a relational database with 
>> transactions.
>>
>> On Sunday, 31 March 2019 10:19:20 UTC-7, Jim S wrote:
>>>
>>> I changed the following in gluon/globals.py and mine is working 
>>> now.  But, I'm unclear on how to test to see if it is handling the 
>>> locking 
>>> properly:
>>>
>>> dd = dict(locked=False,
>>>   client_ip=response.session_client,
>>>   modified_datetime=request.now,
>>>   session_data=session_pickled,
>>>   unique_key=unique_key)
>>>
>>> to 
>>>
>>> dd = dict(locked='False',
>>>   client_ip=response.session_client,
>>>   modified_datetime=str(request.now),
>>>   session_data=session_pickled,
>>>   unique_key=unique_key)
>>>
>>> This makes all my stuff work (I'm still on Python 2.7 but I think 
>>> the problem has to do with the python redis client moving to version 3).
>>>
>>> Leonel - I think this relates back to an issue you commented on late 
>>> last year.   
>>> https://groups.google.com/forum/?pli=1#!searchin/web2py/redis%7Csort:date/web2py/PdquGF_9a2E/6VJpLqsnBgAJ
>>>
>>> At that time I just continued using python redis 2.10.6.  But, can't 
>>> do that forever.  Anyone able to test or improve upon the change I made 
>>> above?  Like I said, it works for me, but I don't know how to see if 
>>> I'm 
>>> causing any other unforeseen damage.
>>>
>>> -Jim
>>>
>>> On Friday, March 29, 2019 at 7:49:03 PM UTC-5, Joe Barnhart wrote:

 Hi Leonel --

 My brain refuses to put together the words "session locked field". 
  I understand the part of pickle smashing the values and encoding them 
 as 
 one string.  The bool has something to do with session locking?  

 I've only looked at the web2py redis code in the most scant way as 
 I wasn't planning to become a redis expert.  Sessions in redis could 
 be 
 important to me, tho, so I may need to set aside some time to dig 

[web2py] from gluon.storage import Storage

2020-09-17 Thread xgp.l...@gmail.com
Hi all,

I wonder if someone can give directions on how to keep a Dict in RAM as a 
method for fast look for data. 

Options:
- from gluon.storage import Storage.
But there is not much info about the reach of this module. Is it renew in 
every request?

- What about cache? 
Can i store a dict and using across requests?


Thanks in advanced,


-- 
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/37537b8a-b176-45ae-8c1d-db14758c39dfn%40googlegroups.com.


Re: [web2py] No module named error

2020-09-06 Thread xgp.l...@gmail.com
Its correct. Module its now working. Thanks sr.

El Sunday, September 6, 2020 a la(s) 2:19:14 PM UTC-5, 
ermolaev...@gmail.com escribió:

> need __init__.py in main folder of application too!
>
> четверг, 23 июля 2020 г. в 04:35:25 UTC+3, snide...@gmail.com: 
>
>>
>>
>> On Tuesday, July 21, 2020 at 11:41:43 PM UTC-7, AGRogers wrote:
>>>
>>> I think I'm on the latest versions of web2py and python. And i have 
>>> problems getting modules to recompile (not sure how related that is to this 
>>> topic). I gave up and just put all my modules in the Models folder. That 
>>> always works for me. I'm going to need to sort that out though at some 
>>> point.  But to be clear, i am not saying there is anything wrong with 
>>> web2py. My general knowledge is scant so it could well be me doing 
>>> something wrong.
>>>
>>>
>> There's a performance impact of putting more files in the Models folder.
>>
>> /dps
>>  
>>
>>> On Wed, 22 Jul 2020 at 16:28, Dave S  wrote:
>>>
>>
>>>>
>>>> On Saturday, July 18, 2020 at 2:15:13 PM UTC-7, xgp.l...@gmail.com 
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Im replicating the example from the book for better testing:
>>>>>
>>>>> ./modules/mytest.py
>>>>>
>>>>> from gluon import current
>>>>>
>>>>> def ip():
>>>>>   return current.request.client
>>>>>
>>>>> ./controllers/test.py
>>>>>
>>>>> from applications.mdplenus.modules.mytest import ip
>>>>>
>>>>
>>>> I have a function restuff() in  dot/modules/restuff.py
>>>>
>>>> I use "import restuff"
>>>>
>>>> I admit that for those files  I'm on python 2.7.something and several 
>>>> bumps back  on web2py versions (I've tried newer ones, just haven't needed 
>>>> to go all in for them yet).  So it's possible that something changed that 
>>>> broke things, but I expect the regression tests Massimo has would have 
>>>> caught it.
>>>>
>>>> web2py, unlike the newer py4web, uses a custom importer.
>>>>
>>>>
>>>>> def index():
>>>>> return "Your ip is " + mytest.ip()
>>>>>
>>>>>
>>>>> * Same error: ImportError('No module named apptest.modules.mytest',)
>>>>>
>>>>>
>>>> /dps
>>>>  
>>>>
>>>> -- 
>>>> 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/c1e19587-9ad9-40d0-9718-fb7200da3f64o%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/web2py/c1e19587-9ad9-40d0-9718-fb7200da3f64o%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>

-- 
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/805155e0-2798-4a0c-bab3-e2554f79c3ean%40googlegroups.com.


Re: [web2py] Re: modules: NameError("name 'reload' is not defined",)

2020-08-19 Thread xgp.l...@gmail.com
Hi,

Looking for the solution to this matter also.

File "web2py/gluon/custom_import.py", line 109, in __call__
result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) 

Files are placed in the modules folder.


Regards,

El Tuesday, August 18, 2020 a la(s) 8:52:43 AM UTC-5, kell...@gmail.com 
escribió:

> Same issue here with newest web2py
>
> Am Di., 18. Aug. 2020 um 07:08 Uhr schrieb 'Annet' via web2py-users <
> web...@googlegroups.com>:
>
>> I reported the same problem some time ago.
>>
>> When I edit a module and save it I get this nameError. Since I am
>> importing the modules into other applications I have to restart web2py
>> everytime I edit a module.
>>
>> Further more the module are no longer compiled on first use, which
>> I also find very annoying.
>>
>> Annet
>>
>> Op zondag 16 augustus 2020 om 12:09:28 UTC+2 schreef Vlad:
>>
>>> same error, though with a lot more than 3 lines
>>>
>>> On Wednesday, June 24, 2020 at 5:36:36 AM UTC-5 serge.bo...@gmail.com 
>>> wrote:
>>>

 I have an issue saving my modues with the last version of web2py.
 Is there something I do wrong?

 Context: Ubuntu 18.04 / web2py version 2.20.4 / python 3.6.9

 How to reproduce this issue (a bug??) with a simple example:

 In the applications examples, create a module (for instance empty.py)

 Then open it, 
 => url: 
 127.0.0.1:8000/admin/default/edit/examples/modules/empty.py?id=modules__empty__py
 The file contains 3 lines:
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 from gluon import *

 do not change anything and save it (ctrl + S)...

 => Since the last version, I get the following message:

  Impossible de recharger le module car:
  NameError("name 'reload' is not defined",)

 Thanks for any advise...

>>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/56370ed0-27a0-4b3d-a984-2fd6ac7bb964n%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/2bde98e7-307e-4645-82bd-2f415d4f0a8cn%40googlegroups.com.


Re: [web2py] Re: modules: NameError("name 'reload' is not defined",)

2020-08-18 Thread xgp.l...@gmail.com
Hi,

I already open a conversation about this but no complete answers were given.
I ran from source and experience the same error.


Cheers,

El Tuesday, August 18, 2020 a la(s) 8:52:43 AM UTC-5, kell...@gmail.com 
escribió:

> Same issue here with newest web2py
>
> Am Di., 18. Aug. 2020 um 07:08 Uhr schrieb 'Annet' via web2py-users <
> web...@googlegroups.com>:
>
>> I reported the same problem some time ago.
>>
>> When I edit a module and save it I get this nameError. Since I am
>> importing the modules into other applications I have to restart web2py
>> everytime I edit a module.
>>
>> Further more the module are no longer compiled on first use, which
>> I also find very annoying.
>>
>> Annet
>>
>> Op zondag 16 augustus 2020 om 12:09:28 UTC+2 schreef Vlad:
>>
>>> same error, though with a lot more than 3 lines
>>>
>>> On Wednesday, June 24, 2020 at 5:36:36 AM UTC-5 serge.bo...@gmail.com 
>>> wrote:
>>>

 I have an issue saving my modues with the last version of web2py.
 Is there something I do wrong?

 Context: Ubuntu 18.04 / web2py version 2.20.4 / python 3.6.9

 How to reproduce this issue (a bug??) with a simple example:

 In the applications examples, create a module (for instance empty.py)

 Then open it, 
 => url: 
 127.0.0.1:8000/admin/default/edit/examples/modules/empty.py?id=modules__empty__py
 The file contains 3 lines:
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 from gluon import *

 do not change anything and save it (ctrl + S)...

 => Since the last version, I get the following message:

  Impossible de recharger le module car:
  NameError("name 'reload' is not defined",)

 Thanks for any advise...

>>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/56370ed0-27a0-4b3d-a984-2fd6ac7bb964n%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/df07ae0b-2ffa-453d-a481-363567f9b6f6n%40googlegroups.com.


Re: [web2py] No module named error

2020-07-22 Thread xgp.l...@gmail.com
Hi,

Im using :
2.19.1-stable+timestamp.2020.03.21.21.49.28

Maybe importing modules is broken?


Cheers,


El Wednesday, July 22, 2020 a la(s) 1:41:43 AM UTC-5, roge...@gmail.com 
escribió:

> I think I'm on the latest versions of web2py and python. And i have 
> problems getting modules to recompile (not sure how related that is to this 
> topic). I gave up and just put all my modules in the Models folder. That 
> always works for me. I'm going to need to sort that out though at some 
> point.  But to be clear, i am not saying there is anything wrong with 
> web2py. My general knowledge is scant so it could well be me doing 
> something wrong.
>
> On Wed, 22 Jul 2020 at 16:28, Dave S  wrote:
>
>>
>>
>> On Saturday, July 18, 2020 at 2:15:13 PM UTC-7, xgp.l...@gmail.com wrote:
>>>
>>> Hi,
>>>
>>> Im replicating the example from the book for better testing:
>>>
>>> ./modules/mytest.py
>>>
>>> from gluon import current
>>>
>>> def ip():
>>>   return current.request.client
>>>
>>> ./controllers/test.py
>>>
>>> from applications.mdplenus.modules.mytest import ip
>>>
>>
>> I have a function restuff() in  dot/modules/restuff.py
>>
>> I use "import restuff"
>>
>> I admit that for those files  I'm on python 2.7.something and several 
>> bumps back  on web2py versions (I've tried newer ones, just haven't needed 
>> to go all in for them yet).  So it's possible that something changed that 
>> broke things, but I expect the regression tests Massimo has would have 
>> caught it.
>>
>> web2py, unlike the newer py4web, uses a custom importer.
>>
>>
>>> def index():
>>> return "Your ip is " + mytest.ip()
>>>
>>>
>>> * Same error: ImportError('No module named apptest.modules.mytest',)
>>>
>>>
>> /dps
>>  
>>
>> -- 
>>
> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/c1e19587-9ad9-40d0-9718-fb7200da3f64o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/c1e19587-9ad9-40d0-9718-fb7200da3f64o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/c787593d-1e9b-4c30-a12a-65251bbda1c2n%40googlegroups.com.


[web2py] Multiple sockets

2020-07-21 Thread xgp.l...@gmail.com

Hi,

Is there a way to specify socket name for DB connection?
Actually is only possible to specify directory, but i have multiple sockets 
on a postgres 11 cluster setup.

Ex:

Cluster 1
postgres2://postgres:postgrespass@/dbname?unix_socket=/tmp/.s.PGSQL.5432

Cluster 2
postgres2://postgres:postgrespass@/dbname?unix_socket=/tmp/.s.PGSQL.5453



Thanks in advanced,

-- 
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/3a7dd6cd-80e1-4191-aed4-9e9f143ac578n%40googlegroups.com.


Re: [web2py] No module named error

2020-07-18 Thread xgp.l...@gmail.com
Hi,

Im replicating the example from the book for better testing:

./modules/mytest.py

from gluon import current

def ip():
  return current.request.client

./controllers/test.py

from applications.mdplenus.modules.mytest import ip

def index():
return "Your ip is " + mytest.ip()


* Same error: ImportError('No module named apptest.modules.mytest',)


__
Thanks in advance,
El Saturday, July 18, 2020 a la(s) 3:20:28 PM UTC-5, snide...@gmail.com 
escribió:

>
>
> On Friday, July 17, 2020 at 3:21:27 PM UTC-7, patito feo wrote:
>
>> Hi,
>>
>>
>> __init__.py file in ./modules
>> moduloname.py file in ./modules
>>
>> But the module still not loade. An error is pop in the web-ide. 
>>
>> [...]

>>> failed to reload module because:

 ImportError('No module named mdplenus.modules.test',


> Is "mdplenus.py" in ./modules?  The name has to match.  Is "test" the name 
> of your application?
>
> /dps
>  
>  
>

-- 
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/a9c90319-850f-4e31-bba4-48ac3dee4149n%40googlegroups.com.