[web2py] Error with couchdb

2019-05-08 Thread Martin Weissenboeck
I want to use couchdb with web2py. It's a little bit hard, because the
documenation is missing in the book, but I found something in
https://pydal.readthedocs.io/en/latest/

Now I have tried

cdb = DAL('couchdb://admin:password@localhost:5984/w2p')

and I got:
Error ticket for "admin"Ticket ID

213.147.184.70.2019-05-08.07-15-24.81e60920-22e8-44bb-a41d-2be4f454a73c
 a bytes-like object is required, not 'str'Version
web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
Python Python 3.5.3: /usr/bin/uwsgi-core (prefix: /usr)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
  File "/home/www-data/web2py/applications/admin/controllers/default.py"
,
line 2021, in 
  File "/home/www-data/web2py/gluon/globals.py", line 421, in 
self._caller = lambda f: f()
  File "/home/www-data/web2py/applications/admin/controllers/default.py"
,
line 1627, in errors
error = pickle.load(fullpath_file)
  File "/home/www-data/web2py/gluon/html.py", line 692, in XML_unpickle
return XML(marshal.loads(data))
TypeError: a bytes-like object is required, not 'str'

Error snapshot [image: help]


TypeError(a bytes-like object is required, not 'str')

-- 
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/CAMcwXCdaVcGZPHVtsPhNMbi466moB2DNZ%2B8HfZ6L_ZBgmKnLQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: nginx, basic auth: internal error

2019-05-08 Thread Tim Nyborg
My guess is that something is wrong with the file permissions on the 
sessions folder/subfolders.  If uwsgi is trying to write a session file and 
failing, you'll get an unrecoverable error.

On Wednesday, 8 May 2019 07:49:34 UTC+1, tomasz bandura wrote:
>
> Hello,
>
> I use web2py (2.16.1) on 2 environments:
> 1. Embedded Rocket wsgi server
> 2. Deployed on nginx+uwsgi
>
> I have the same application on both env, connected to the same database.
> The application uses Basic Authentication, like in the example:
>
> def f1():
>
>   auth.basic()  if auth.user:
> *## do something ...*  else:
> *## raise defined auth exception*
>
>
> What is strange, the problem occures only on nginx+uwsgi: 
> 1. If I call it without basic authorization it will raise defined 
> exception correctly
> 2. The problem is when I put header with correct authorization - it raises 
> *Internal 
> error Ticked issued: uncoverable*, and there is no any traces in logs.
>
> The solution is putting *session.forget() *before *auth.basic()*, but why?
>
> Could someone explain me the impact of session.forget() for that behaviour?
>
> According documentation it is used to avoid storing session ( and it 
> is understandable)
>
> Regards,
> Tomasz
>

-- 
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/069ab380-b514-42e7-92d7-05b0c6c70dd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: nginx, basic auth: internal error

2019-05-08 Thread tomasz bandura
Not sure, because I also use in the same application a standard login/pass
form auth and it works perfectly.


śr., 8 maj 2019 o 10:09 Tim Nyborg  napisał(a):

> My guess is that something is wrong with the file permissions on the
> sessions folder/subfolders.  If uwsgi is trying to write a session file and
> failing, you'll get an unrecoverable error.
>
> On Wednesday, 8 May 2019 07:49:34 UTC+1, tomasz bandura wrote:
>>
>> Hello,
>>
>> I use web2py (2.16.1) on 2 environments:
>> 1. Embedded Rocket wsgi server
>> 2. Deployed on nginx+uwsgi
>>
>> I have the same application on both env, connected to the same database.
>> The application uses Basic Authentication, like in the example:
>>
>> def f1():
>>
>>   auth.basic()  if auth.user:
>> *## do something ...*  else:
>> *## raise defined auth exception*
>>
>>
>> What is strange, the problem occures only on nginx+uwsgi:
>> 1. If I call it without basic authorization it will raise defined
>> exception correctly
>> 2. The problem is when I put header with correct authorization - it
>> raises *Internal error Ticked issued: uncoverable*, and there is no any
>> traces in logs.
>>
>> The solution is putting *session.forget() *before *auth.basic()*, but
>> why?
>>
>> Could someone explain me the impact of session.forget() for that
>> behaviour?
>>
>> According documentation it is used to avoid storing session ( and it
>> is understandable)
>>
>> Regards,
>> Tomasz
>>
> --
> 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/069ab380-b514-42e7-92d7-05b0c6c70dd7%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAGTupugv_ZWE%3DAQn%2Bx8sWAHBcH0XVaLeTe7d_B5cKswFgB_-gA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Future of web2py

2019-05-08 Thread Rafael Oliveira
Will web3py replace web2py? Will web2py end? Sorry for my English. I used 
the google translator.

-- 
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/86a442ad-6412-4e87-af67-fae0717f4471%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] SQLAlchemy Core vs PyDAL?

2019-05-08 Thread Jurgis Pralgauskis
Hi, 

What are main differences between two of those?

their ideology seems similar -- no ORM , but pyDAL seems less verbose
https://docs.sqlalchemy.org/en/13/core/tutorial.html#define-and-create-tables

it also has similar concept for selected results (Store):
https://docs.sqlalchemy.org/en/13/core/connections.html#sqlalchemy.engine.ResultProxy

curious, could pyDAL be based on Alchemy Core (Expression language) --  it 
already supports may sql-engines?

-- 
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/52e5b45d-dba7-4f0c-9e69-d748a61b95f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web3py

2019-05-08 Thread Daniel


El lunes, 6 de mayo de 2019, 19:38:47 (UTC-4), jcrm...@gmail.com escribió:
>
> My 2c
>
> You could call it web2py3 with this logic
> web2py was web for Python (at the time it was Python 2.x)
> web2py3 will the web for Python 3.
>
>
>
FWIW, I second this. 

-- 
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/28cd74e6-2c6d-4316-b285-2c5dcf78eac2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.