[web2py] Re: web2py_osx.zip seems way out of date ???

2018-02-23 Thread 'jim kaubisch' via web2py-users


On Wednesday, February 7, 2018 at 10:47:19 AM UTC-8, jim kaubisch wrote:
>
> Hi,
>
> I needed to directed my attention away from my web2py project a few months 
> ago but am now trying to get back into it. 
> A wise Step 1 would seem to be to update from 2.14.6 to the current 
> version (2.16.1 I assume).
>
> First tried from source but got 
>
> Traceback (most recent call last):
>
>   File "web2py.py", line 21, in 
>
> import gluon.widget
>
>   File “./Development/web2py/gluon/__init__.py", line 38, in 
>
> from .dal import DAL, Field
>
>   File “./Development/web2py/gluon/dal.py", line 17, in 
>
> from pydal.migrator import Migrator, InDBMigrator
>
> ImportError: cannot import name InDBMigrator
>
>
> I still have 2.14.6 installed (in a separate sub-tree) - is that the 
> problem?
>
>
> so I downloaded the mac "mac_osx.zip" to try that but - 
>
> after unzipping, when I try to run the resulting web2py/web2py.app I just 
> get a pop up saying "web2py error". 
>
> When I look at the file info for the web2py.app file it says Version 
> 2.4.7, dated 29 May, 2013
>
>
> What am I doing wrong? 
>
> The app file info certainly doesn't look encouraging. 
>
> I assume having 2 versions of web2py in separate sub-trees shouldn't be a 
> problem
>
>
> Thanks,
>
> Jim
>
>
>

-- 
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.


[web2py] Re: web2py_osx.zip seems way out of date ???

2018-02-23 Thread 'jim kaubisch' via web2py-users
Thanks for the reply, Dave.

There have been a number of issues surrounding the last couple of versions 
of Mac OS which come down to the fact that Apple has tightened security of 
the core of the system, As a result of that, some third party code doesn't 
always run because its trying to do things that it probably should never 
have been able to do, and that are no longer permitted - I was tearing my 
hair out the last couple of days trying to update my version of pyinstaller 
with pip failing no matter what I did because the system would not allow it 
to delete old files that it expected to be able to :(

The problem here may ultimately be tied up with this general issue. I will 
keep poking at it. It seems I'm the only one who has the problem :(

Jim

On Thursday, February 15, 2018 at 2:05:26 AM UTC-8, Dave S wrote:
>
> On Wednesday, February 14, 2018 at 6:23:44 PM UTC-8, jim kaubisch wrote:
>>
>> Has no-one else had this problem?
>>
>
> I run web2py on Windows or on linux, and having multiple versions has not 
> been a problem.  That's the way I usually upgrade, copying my applications 
> across, and looking for js/css/appadmin changes.   Lets me switch back 
> easily, and I'm not running anywhere that the size of web2py makes for a 
> problem.
>
> I don't often use a Mac, so I don't know how that environment changes 
> things, other than some of the key labels.
>
> /dps
>  
>
>>
>>
>> On Wednesday, February 7, 2018 at 10:47:19 AM UTC-8, jim kaubisch wrote:
>>>
>>> Hi,
>>>
>>> I needed to directed my attention away from my web2py project a few 
>>> months ago but am now trying to get back into it. 
>>> A wise Step 1 would seem to be to update from 2.14.6 to the current 
>>> version (2.16.1 I assume).
>>>
>>> First tried from source but got 
>>>
>>> Traceback (most recent call last):
>>>
>>>   File "web2py.py", line 21, in 
>>>
>>> import gluon.widget
>>>
>>>   File “./Development/web2py/gluon/__init__.py", line 38, in 
>>>
>>> from .dal import DAL, Field
>>>
>>>   File “./Development/web2py/gluon/dal.py", line 17, in 
>>>
>>> from pydal.migrator import Migrator, InDBMigrator
>>>
>>> ImportError: cannot import name InDBMigrator
>>>
>>>
>>> I still have 2.14.6 installed (in a separate sub-tree) - is that the 
>>> problem?
>>>
>>>
>>> so I downloaded the mac "mac_osx.zip" to try that but - 
>>>
>>> after unzipping, when I try to run the resulting web2py/web2py.app I 
>>> just get a pop up saying "web2py error". 
>>>
>>> When I look at the file info for the web2py.app file it says Version 
>>> 2.4.7, dated 29 May, 2013
>>>
>>>
>>> What am I doing wrong? 
>>>
>>> The app file info certainly doesn't look encouraging. 
>>>
>>> I assume having 2 versions of web2py in separate sub-trees shouldn't be 
>>> a problem
>>>
>>>
>>> Thanks,
>>>
>>> Jim
>>>
>>>
>>>

-- 
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.


[web2py] cache response.render in views

2018-02-23 Thread 黄祥
according to book : 
http://web2py.com/books/default/chapter/29/04/the-core?search=response.render, 
the response.render is used in controllers, let say, my controller is 
contain nested loop and i decide to put it on views, but i don't want to 
lose the web2py cache function
*e.g.*
*controllers/default.py*
@cache.action(time_expire = cache_time_expire, cache_model = cache_model, 
quick = cache_quick, prefix = cache_prefix)
def report_bank():
rows_currency = db(db.currency.id > 0).iterselect()
return dict(rows_currency = rows_currency)

and put the nested loop in views, my question is this function is cached 
without assigned to response.render? if not how can i cache this function 
using web2py way?

thanks and best regards,
stifan

-- 
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.


[web2py] Re: Scheduler_Task Table Commit Issue (not Commiting) - Using queue_task and commit after

2018-02-23 Thread Fabrizzio Abogadoc
I'm using MySQL, I wasn't able to insert or queue in any way... but ...

I've managed to solve the issue in the next way: 

Using the queue_task method, if the task is inserted, returns ID, if are 
errors we can check the field and the msg returned. Debugging the msgs, 
I've inferred that NOW queue_task needs ALL params fields passed to 
succesfylly insert a Task.

FOR EXAMPLE:

task = scheduler.queue_task('request_source_task',
application_name=appname,
status="QUEUED",
task_name='request_source_task',
start_time=datetime.datetime.now() 
+ timedelta(seconds=30),
pargs=ids_request_source,
period=cinco_min,
repeats=1,  
retry_failed=3,  
timeout=treinta_min, 
sync_output=1
)
db_scheduler.commit()

ONLY considering all params, the queue_task inserted a record now... It's 
seems to be a bug...

(Meanwile another project in other server, after migration last week, had 
the same same issue)

-- 
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.


[web2py] Re: Trouble with reset password

2018-02-23 Thread Bryan Nahrwold
Thanks, Dave. That's helpful information.

On Wednesday, 24 January 2018 10:07:04 UTC-7, Julian Sanchez wrote:
>
> I'm having troubles with the reset password functionality and I'm hoping 
> you guys can give me some pointers on what to check, or how to fix it 
> (version 2.16.1 stable, running from source).
>
> When running my application in GAE I can go to the reset password page 
> ('default/user/request_reset_password') and enter the email address, but 
> when I click on 'Request reset password' button It goes straight to the 
> internal error page, and the logs show "TypeError: long() argument must be 
> a string or a number, not 'auth_user'".
>
> I re-downloaded the web2py source code and put it on a separate location.  
> I simply went to the default app and registered a test user.  When I 
> clicked on the "Lost Password" menu option it went straight to a "404 NOT 
> FOUND".
>
> So at this point I'm not sure if my application is doing something wrong 
> or if it's an issue with the actual framework since the default application 
> doesn't seem to be working right.  I've seen other posts around password 
> reset not working but seem to be related to other issues.  Any 
> ideas/suggestions I would greatly appreciate it.
>
> Thanks,
> Julian
>
>
>
>

-- 
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.


[web2py] Re: Python3 and uwsgi

2018-02-23 Thread Ari Lion BR Sp
if installing on aws ec2 - need to add this repo:

https://packages.ubuntu.com/search?keywords=uwsgi-plugin-python3=names=artful=all


Em sexta-feira, 23 de fevereiro de 2018 14:55:46 UTC-3, Ari Lion BR Sp 
escreveu:
>
> Hi, I have tryed a little bit, and got something...:
>
>
> https://github.com/arisobel/web2py_scripts/blob/master/setup-web2py-nginx-p3-uwsgi-ubuntu.sh
> As I am new at all of this stuff, please better the code.
>
>
> 
>
>
> Em quinta-feira, 22 de fevereiro de 2018 11:59:38 UTC-3, Ari Lion BR Sp 
> escreveu:
>>
>> Hi, is there already a script for making
>> web2py, python3 and uwsgi work together ?
>>
>> please create it at:
>> web2py/scripts/*
>>
>>
>> Em quarta-feira, 23 de agosto de 2017 12:53:49 UTC-3, Henri Chapelle 
>> escreveu:
>>>
>>> Hi,
>>> I can't get web2py to work with uwsgi and python3.
>>> Does anybody succeeded with a similar setup ?
>>>
>>> From what I see by searching the internet and my tests, uwsgi doesn't 
>>> accept unicode text for headers (need to be latin1 encoded text).
>>> All the pages have 0bytes in the log.
>>>
>>> My setup is working well with python2 and uwsgi tough.
>>>
>>> Is there an easy way to make web2py, python3 and uwsgi work together ?
>>>
>>> Regards,
>>> Henri
>>>
>>

-- 
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.


[web2py] Re: web2py.scheduler.hpxyz#2791 - ERROR - we received a task that isn't there (15)

2018-02-23 Thread Pierre
it's worst than i thought:

i increased tasks volume(100) with 3 up to 5 workers and now i get lot's of 
: *we received a task that isn't ther*e errors and a couple of *dead tasks *( 
queued forever ). bad bad bad
i'll check if *python-rq* can help with this and if it can't i am done with 
'gesticulations'...

http://python-rq.org/

-- 
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.


[web2py] Re: Python3 and uwsgi

2018-02-23 Thread Ari Lion BR Sp
Hi, I have tryed a little bit, and got something...:

https://github.com/arisobel/web2py_scripts/blob/master/setup-web2py-nginx-p3-uwsgi-ubuntu.sh
As I am new at all of this stuff, please better the code.




Em quinta-feira, 22 de fevereiro de 2018 11:59:38 UTC-3, Ari Lion BR Sp 
escreveu:
>
> Hi, is there already a script for making
> web2py, python3 and uwsgi work together ?
>
> please create it at:
> web2py/scripts/*
>
>
> Em quarta-feira, 23 de agosto de 2017 12:53:49 UTC-3, Henri Chapelle 
> escreveu:
>>
>> Hi,
>> I can't get web2py to work with uwsgi and python3.
>> Does anybody succeeded with a similar setup ?
>>
>> From what I see by searching the internet and my tests, uwsgi doesn't 
>> accept unicode text for headers (need to be latin1 encoded text).
>> All the pages have 0bytes in the log.
>>
>> My setup is working well with python2 and uwsgi tough.
>>
>> Is there an easy way to make web2py, python3 and uwsgi work together ?
>>
>> Regards,
>> Henri
>>
>

-- 
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.


Re: [web2py] Error using Postgres

2018-02-23 Thread Morganti
Hi Dave,

I found "pg8000" inside "gluon/contrib".

In "gluon\packages\dal\pydal\adapters" I found the "postgres.py". So is it 
wrong? Do I need to move pg8000 to "gluon\packages\dal\pydal\adapters"?

You said about socket. I have no idea how to do it.

Thanks a lot your support!
Best regards
Andre

Em quinta-feira, 22 de fevereiro de 2018 18:30:17 UTC-3, Dave S escreveu:
>
>
>
> On Thursday, February 22, 2018 at 8:29:43 AM UTC-8, Morganti wrote:
>>
>> Hi, thanks your time.
>>
>> How can I check it? If I try to open web2py shell (web2py -S app -M), I 
>> had no errors and all tables could be used.
>>
>> Thanks 
>> BR
>> André
>>
>>
> That's one way to check.  The actual files should show up in the 
> web2py/gluon/packages/dal/pydal/adapters, I think, and not just in 
> gluon/contrib.
>
>
> But the error looks, to my inexpert eye, like a socket error.  So I would 
> start by verifying the socket exists and has the proper permissions. 
>
> /dps
>
> Em quinta-feira, 22 de fevereiro de 2018 13:08:23 UTC-3, Ovidio Marinho 
>> escreveu:
>>>
>>> make sure the pg8000 and psycopg2 libraries are installed at the start 
>>> of web2py
>>>
>>>
>>>
>>>
>>>
>>>
>>>[image: http://itjp.net.br] 
>>>  http://itjp.net.b r
>>>   *Ovidio Marinho Falcao Neto*
>>>  ovid...@gmail.com
>>> Brasil
>>>  
>>>
>>> 2018-02-22 12:40 GMT-03:00 Morganti :
>>>
 Hello,

 I have a VPS using ubuntu 16.04, nginx, Postgres and web2py 2.16.1.

 I tried to execute one controller that populate some tables and got the 
 error below.

 Then, I used that command to create a csv file with all tables and 
 uploaded it in my desktop using SQLITE and no error were found.

 The controller coud create some rows before the error.

 Traceback (most recent call last):
   File "/home/www-data/py27env/web2py/gluon/restricted.py", line 219, in 
 restricted
 exec(ccode, environment)
   File 
 "/home/www-data/py27env/web2py/applications/nwproducao/controllers/carreira.py",
  line 633, in 
   File "/home/www-data/py27env/web2py/gluon/globals.py", line 419, in 
 
 self._caller = lambda f: f()
   File 
 "/home/www-data/py27env/web2py/applications/nwproducao/controllers/carreira.py",
  line 21, in gera_plano_carreira
 vgraduacao = gera_graduacao()
   File 
 "/home/www-data/py27env/web2py/applications/nwproducao/controllers/carreira.py",
  line 56, in gera_graduacao
 for r in rows:
   File 
 "/home/www-data/py27env/web2py/gluon/packages/dal/pydal/objects.py", line 
 3039, in __iter__
 row = next(self)
   File 
 "/home/www-data/py27env/web2py/gluon/packages/dal/pydal/objects.py", line 
 3014, in __next__
 db_row = self.cursor.fetchone()
   File "/home/www-data/py27env/web2py/gluon/contrib/pg8000/core.py", line 
 947, in fetchone
 return next(self)
   File "/home/www-data/py27env/web2py/gluon/contrib/pg8000/core.py", line 
 1032, in __next__
 self._c.handle_messages(self)
   File "/home/www-data/py27env/web2py/gluon/contrib/pg8000/core.py", line 
 2088, in handle_messages
 raise self.error
 ProgrammingError: (u'ERROR', u'34000', u'portal "pg8000_portal_13259" does 
 not exist', u'postgres.c', u'1861', u'exec_execute_message', u'', u'')

 *Thanks your helping.*

 *Best regards*

 *Andre*

 -- 
 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.