Closed anotine10 closed 4 years ago
As for the analysis of any Unauthorized
problem, you could activate verbose-security
. It gives more detailed information about the cause of the Unauthorized
.
To activate verbose-security
, you add to your Zope configuration file (in a typical Plone setup, this is parts/{instance|client1}/etc/zope.conf
):
security-policy-implementation python
verbose-security on
This will not solve the problem, just give more information about it.
Note that manual modifications to the Zope configuration file are lost when you next call buildout
(which is likely a good thing in this special case).
@anotine10 I was not able to reproduce this problem. Here is what I did:
$ python3.7 -m venv z
$ cd z
$ bin/pip install Zope Paste # I know this is not the documented way but currently it works.
$ bin/pip install Products.ZSQLMethods
$ bin/mkwsgiinstance -d .
I struggled a bit to find a DA which is Python 3 compatible until I found this one:
$ bin/pip install -e git+https://github.com/perfact/ZPsycopgDA.git#egg=ZPsycopgDA
$ bin/pip install psycopg2-binary
$ bin/runwsgi etc/zope.ini
No I was able to create a Z Psycopg 2 Database Connection
and afterwards a Z SQL Method
which could even select from the database.
So in general: Products.ZSQLMethods works with Zope 4 and Python 3. (If Plone is part go the problem: I cannot tell.) So you might try out what @d-maurer suggested an report back your findings.
https://pypi.org/project/Products.ZMySQLDA/ is fully Python 3 compatible. And everything works on Zope 4.x. I cannot reproduce the issue, either.
As there has not been any further followup and this cannot be reproduced I will close this issue. If you still see problems please provide more information, such as from the added output produced by the verbose-security
setting Dieter suggested.
Hello, i can create a connection to a Mysql Database, i can do some queries with the Test connection. However, i can not create a Z SQL method: Neither add, add end edit, add and Test works. It fails with some weird insuficient privileges. afterwards, the listing of the object in the zope administration interface shows that the zsql method is broken.
Is the zsql method working for zope 4.1, plone 5.3, python3.6?
I add the stack trace and the information on the system below.
Thanks for the help!
stack trace:
system information: Plone 5.2.0 (5207) CMF 2.4.0 Zope 4.1.1 Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 13:42:17) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] PIL 6.1.0 (Pillow) WSGI: On Server: waitress 1.3.0
darwin