Re: [web2py] Re: web2py 2.18.5 is OUT

2019-07-28 Thread Angelo Compagnucci
HI Massimo,

Can you tag R-2.18.5?

Thanks!

Il giorno ven 5 lug 2019 alle ore 07:18 黄祥
 ha scritto:
>
> already tried define the length on field constructor and change web server 
> because error above refer to rocket.py
> ref:
> https://groups.google.com/d/msg/web2py/2B9B9o151II/UyfREFmlBgAJ
>
> modules/table_test.py
> test = db.define_table('test',
> Field('test', length = 255),
> on_define = on_define_test)
>
> $ python ~/learn/python/web2py/anyserver.py -s gevent -i 0.0.0.0 -p 8000
> starting gevent on 0.0.0.0:8000...
> Traceback (most recent call last):
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py",
>  line 976, in handle_one_response
> self.run_application()
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py",
>  line 924, in run_application
> self.process_result()
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py",
>  line 910, in process_result
> self.write(data)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py",
>  line 757, in write
> self._write_with_headers(data)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py",
>  line 778, in _write_with_headers
> self._write(data)
>   File 
> "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py",
>  line 733, in _write
> header_str = b'%x\r\n' % len(data)
> TypeError: object of type 'Field' has no len()
> 2019-07-03T10:07:08Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '63729', 
> 'HTTP_HOST': 'localhost:8000', (hidden keys: 28)} failed with TypeError
>
> btw, anyserver.py cant run gunicorn in 2.18.5, no error occured on terminal, 
> but cant be access on browser
>
> $ python ~/learn/python/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000
> starting gunicorn on 0.0.0.0:8000...
> [2019-07-03 17:01:19 +0700] [71683] [INFO] Starting gunicorn 19.9.0
> [2019-07-03 17:01:19 +0700] [71683] [INFO] Listening at: http://0.0.0.0:8000 
> (71683)
> [2019-07-03 17:01:19 +0700] [71683] [INFO] Using worker: sync
> [2019-07-03 17:01:19 +0700] [71687] [INFO] Booting worker with pid: 71687
>
> any way out ?
>
> thx n 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/40c55b2d-0a29-420d-9453-bcf701dbb009%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo

-- 
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/CA%2BTH9V%3D7mNO112PLsCeyQc_VtJfRVRnej1gWK_FwcLPpmRTbGQ%40mail.gmail.com.


[web2py] Re: web2py 2.18.5 is OUT

2019-07-04 Thread 黄祥
already tried define the length on field constructor and change web server 
because error above refer to rocket.py
*ref:*
https://groups.google.com/d/msg/web2py/2B9B9o151II/UyfREFmlBgAJ

*modules/table_test.py*
test = db.define_table('test', 
Field('test', length = 255), 
on_define = on_define_test)

$ python ~/learn/python/web2py/anyserver.py -s gevent -i 0.0.0.0 -p 8000
starting gevent on 0.0.0.0:8000...
Traceback (most recent call last):
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py"
, line 976, in handle_one_response
self.run_application()
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py"
, line 924, in run_application
self.process_result()
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py"
, line 910, in process_result
self.write(data)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py"
, line 757, in write
self._write_with_headers(data)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py"
, line 778, in _write_with_headers
self._write(data)
  File 
"/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/site-packages/gevent/pywsgi.py"
, line 733, in _write
header_str = b'%x\r\n' % len(data)
TypeError: object of type 'Field' has no len()
2019-07-03T10:07:08Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '63729', 
'HTTP_HOST': 'localhost:8000', (hidden keys: 28)} failed with TypeError

btw, anyserver.py cant run gunicorn in 2.18.5, no error occured on 
terminal, but cant be access on browser

$ python ~/learn/python/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000
starting gunicorn on 0.0.0.0:8000...
[2019-07-03 17:01:19 +0700] [71683] [INFO] Starting gunicorn 19.9.0
[2019-07-03 17:01:19 +0700] [71683] [INFO] Listening at: http://0.0.0.0:8000 
(71683)
[2019-07-03 17:01:19 +0700] [71683] [INFO] Using worker: sync
[2019-07-03 17:01:19 +0700] [71687] [INFO] Booting worker with pid: 71687

any way out ?

thx n 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/40c55b2d-0a29-420d-9453-bcf701dbb009%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.18.5 is OUT

2019-04-26 Thread Web2_3py

2.18.5 under python 2:

  File "C:\Python27\lib\pickle.py", line 892, in load_proto
raise ValueError, "unsupported pickle protocol: %d" % proto
ValueError: unsupported pickle protocol: 3


2.18.5 under python 3:

*import_from_csv_file error*

 'charmap' codec can't decode byte 0x81 in position 
46: character maps to 

-- 
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 2.18.5 is OUT

2019-04-12 Thread 黄祥
it's work, no error in web2py app, my bad, it's just about configuration 
migrate_enabled=*True *(in dev environment), already change before but 
forgot the value of Appconfig(reload=*False*), correct one is *True*, 
because it's in dev environment, in production environment run well, 
because the database and table already setup.

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: web2py 2.18.5 is OUT

2019-04-11 Thread Massimo Di Pierro
did this code work in earlier versions of web2py? Can you post minimal code 
to reproduce?

On Thursday, 11 April 2019 18:58:23 UTC-7, 黄祥 wrote:
>
> Traceback (most recent call last):
>   File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 590, in 
> has_membership
> group_id = int(group_id)
> ValueError: invalid literal for int() with base 10: 'Admin'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/Users/sugizo/learn/python/web2py/gluon/restricted.py", line 219, 
> in restricted
> exec(ccode, environment)
>   File 
> "/Users/sugizo/learn/python/web2py/applications/ppd/models/db_wizard_0_auth.py",
>  
> line 21, in 
> has_membership_admin = auth.has_membership('Admin')
>   File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 592, in 
> has_membership
> group_id = self.id_group(group_id)  # interpret group_id as a role
>   File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 454, in 
> id_group
> rows = self.db(self.table_group().role == role).select()
>   File 
> "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/objects.py", 
> line 2395, in select
> return adapter.select(self.query, fields, attributes)
>   File 
> "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/sqlite.py",
>  
> line 82, in select
> return super(SQLite, self).select(query, fields, attributes)
>   File 
> "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  
> line 763, in select
> return self._select_aux(sql, fields, attributes, colnames)
>   File 
> "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  
> line 719, in _select_aux
> rows = self._select_aux_execute(sql)
>   File 
> "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  
> line 713, in _select_aux_execute
> self.execute(sql)
>   File 
> "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
>  
> line 67, in wrap
> return f(*args, **kwargs)
>   File 
> "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  
> line 413, in execute
> rv = self.cursor.execute(command, *args[1:], **kwargs)
> sqlite3.OperationalError: no such table: auth_group
>
> step to reproduce just copy the working old app into web2py recent version 
> 2.18.5 with Python 3.7.3
>
> 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: web2py 2.18.5 is OUT

2019-04-11 Thread 黄祥
Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 590, in 
has_membership
group_id = int(group_id)
ValueError: invalid literal for int() with base 10: 'Admin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sugizo/learn/python/web2py/gluon/restricted.py", line 219, 
in restricted
exec(ccode, environment)
  File 
"/Users/sugizo/learn/python/web2py/applications/ppd/models/db_wizard_0_auth.py",
 
line 21, in 
has_membership_admin = auth.has_membership('Admin')
  File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 592, in 
has_membership
group_id = self.id_group(group_id)  # interpret group_id as a role
  File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 454, in 
id_group
rows = self.db(self.table_group().role == role).select()
  File 
"/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/objects.py", 
line 2395, in select
return adapter.select(self.query, fields, attributes)
  File 
"/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/sqlite.py",
 
line 82, in select
return super(SQLite, self).select(query, fields, attributes)
  File 
"/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 763, in select
return self._select_aux(sql, fields, attributes, colnames)
  File 
"/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 719, in _select_aux
rows = self._select_aux_execute(sql)
  File 
"/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 713, in _select_aux_execute
self.execute(sql)
  File 
"/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/__init__.py",
 
line 67, in wrap
return f(*args, **kwargs)
  File 
"/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 413, in execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
sqlite3.OperationalError: no such table: auth_group

step to reproduce just copy the working old app into web2py recent version 
2.18.5 with Python 3.7.3

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: web2py 2.18.5 is OUT

2019-04-07 Thread Massimo Di Pierro
errata.

Many **thanks** to Paolo Pastori for his many bugs fixes and patches.

:-)

On Sunday, 7 April 2019 22:02:22 UTC-7, Massimo Di Pierro wrote:
>
> Contains mostly bug fixes, backward compatibility fixes, internal rewrites.
> Many takes to Paolo Pastori for his many bugs fixes and patches.
>
> 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.
For more options, visit https://groups.google.com/d/optout.