Installing ZPsycopgDA on Zope - database

So, I'm trying to install ZPsycopgDA on Zope, but it keeps giving me the following error on the log file:
2022-02-13T02:11:01 ERROR Application Couldn't install ZPsycopgDA
Traceback (most recent call last):
File "/home/rubens/zope/lib64/python2.7/site-packages/OFS/Application.py", line 660, in install_product
global_dict, global_dict, silly)
File "/home/rubens/zope/instance/Products/ZPsycopgDA/__init__.py", line 21, in <module>
import DA
File "/home/rubens/zope/instance/Products/ZPsycopgDA/DA.py", line 21, in <module>
import db
File "/home/rubens/zope/instance/Products/ZPsycopgDA/db.py", line 18, in <module>
from Shared.DC.ZRDB.TM import TM
ImportError: No module named ZRDB.TM
I added the Zope lib directory to PYTHONPATH (/home/rubens/zope/lib64) as instructed, but still gives me this error. Any clues? I'm using Zope2==2.13.30.

Found the solution. Had to install Products.ZSQLMethods (pip install Products.ZSQLMethods==2.13.4). I've installed this version because of Zope2==2.13.30 compatibility.

Related

Import qd.cae.dyna failed

I have a problem with the library qd.cae.dyna
I have a script which calls this library and when I run it on my local session using pycharm there is no problems, it runs well.
But when I run it from a .bat file (and I have to), I get this error :
Traceback (most recent call last):
File "\\bdom.ad.corp\...\qd\cae\dyna.py", line 4, in <module>
from .dyna_cpp import *
ImportError: DLL load failed: Le module spécifié est introuvable.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "DataControl.py", line 1, in <module>
from qd.cae.dyna import *
File "\\bdom.ad.corp\...\qd\cae\dyna.py", line 7, in <module>
"Could not import C++ Submodule dyna_cpp with error message: %s." % str(err))
ImportError: Could not import C++ Submodule dyna_cpp with error message:
I have looked up and some people fix the issue by installing some missing DLLs LIBIOMP5MD.DLL and LIBMMD.DLL but I checked and those are installed on my computer.
Do you have any advices to run qd.cae.dyna from a .bat file ? It would be greatly appreciated

Cant' launch pgadmin4 on ubuntu hirsute

I'm trying to launch pgdamin4 on my ubuntu device, and I just get this error again and again despite every solution I tried.
I followed this to install my pgdamin4 : https://www.pgadmin.org/download/pgadmin-4-apt/
Do you have any solutions?
Traceback (most recent call last):
File "/usr/pgadmin4/web/pgAdmin4.py", line 39, in <module>
import config
File "/usr/pgadmin4/web/config.py", line 25, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "/usr/pgadmin4/web/pgadmin/__init__.py", line 23, in <module>
from flask import Flask, abort, request, current_app, session, url_for
ModuleNotFoundError: No module named 'flask'

Install Airflow - ImportError: No module named clsregistry

Hi I am new to airflow and try to install it. And I can install airflow successfully but when I do an airflow initdb, the error is :
(airflow_virtualenv) C02CF6JRMD6R:bin ybao$ airflow initdb
Traceback (most recent call last): File "/Users/ybao/airflow_virtualenv/bin/airflow", line 26, in <module>
from airflow.bin.cli import CLIFactory File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/bin/cli.py", line 82, in <module>
from airflow.www.app import (cached_app, create_app) File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/www/app.py", line 42, in <module>
from airflow.www.blueprints import routes File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/www/blueprints.py", line 25, in <module>
from airflow.www import utils as wwwutils File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/airflow/www/utils.py", line 40, in <module>
import flask_admin.contrib.sqla.filters as sqlafilters File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/flask_admin/contrib/sqla/__init__.py", line 2, in <module>
from .view import ModelView File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/flask_admin/contrib/sqla/view.py", line 18, in <module>
from flask_admin.contrib.sqla.tools import is_relationship File "/Users/ybao/airflow_virtualenv/lib/python2.7/site-packages/flask_admin/contrib/sqla/tools.py", line 4, in <module>
from sqlalchemy.ext.declarative.clsregistry import _class_resolver ImportError: No module named clsregistry
Where should I install the packages?
Thanks!!
What version of airflow are you using?
I just ran into this issue using apache-airflow 1.10.14.
This issue was linked to the recent release of SQLAlchemy (1.4.2) or Flask-SQLAlchemy (2.5.1)
Reverting those dependencies to the previous version fixed it for me:
pip install SQLAlchemy==1.3.23
pip install Flask-SQLAlchemy==2.4.4

Cron job failing with firebase in google cloud app engine

I have used to below firebase blog link to execute a cron job on google cloud app engine for firebase functions but i am getting the below error.
Firebase Blog link
Please help..
22:47:33.468
(/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263)
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/base/data/home/apps/s~updateroom-1a8fe/20170705t224250.402458509646721682/main.py", line 18, in <module>
import pubsub_utils
File "/base/data/home/apps/s~updateroom-1a8fe/20170705t224250.402458509646721682/pubsub_utils.py", line 23, in <module>
import httplib2
File "./lib/httplib2/__init__.py", line 352
print('%s:' % h, end=' ', file=self._fp)
^
SyntaxError: invalid syntax
print('%s:' % h, end=' ', file=self._fp) is valid python3, but not valid python2.
You can either do a future import to use this syntax in python2:
from __future__ import print_function
or use the old print syntax.
UPDATE
Reviewing this, I noticed that the offending line of code is in library code: ./lib/httplib2/__init__.py
So the problem is that your httplib2 installation is the python3 version rather than the python2 version.
You can try reinstalling your vendored packages to fix this; the command will be
pip install -r <name-of-your-vendored-requirements-file> -t lib
Ensure that you are using the right version of pip: pip --version should point to a location within a python2 installation.

Appengine mercurial error

I am trying to deploy mercurial for google app engine and keep getting this error. Please see if anyone has a solution.
<type 'exceptions.ImportError'>: No module named pwd
Traceback (most recent call last):
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hgapp.py", line 33, in <module>
main()
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hgapp.py", line 23, in main
from dashboard import dashboard
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/dashboard.py", line 3, in <module>
from mercurial import templater, templatefilters, util
File "/base/python_dist/lib/python2.5/py_zipimport.py", line 242, in load_module
exec code in mod.__dict__
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hg.zip/mercurial/templater.py", line 10, in <module>
File "/base/python_dist/lib/python2.5/py_zipimport.py", line 242, in load_module
exec code in mod.__dict__
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hg.zip/mercurial/util.py", line 543, in <module>
File "/base/python_dist/lib/python2.5/py_zipimport.py", line 242, in load_module
exec code in mod.__dict__
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hg.zip/mercurial/posix.py", line 10, in <module>
maybe one of these projects will be of use?
http://bitbucket.org/durin42/mercurial-appengine/overview
http://appgallery.appspot.com/about_app?app_id=agphcHBnYWxsZXJ5chQLEgxBcHBsaWNhdGlvbnMYne8BDA (see also https://www.mercurial-scm.org/pipermail/mercurial/2008-December/022692.html )
You can't access the unix password database in the App Engine sandbox, so the pwd module isn't installed.
In general, many random python modules will require extensive hacking to get them to run on App Engine.
The simplest way is remove import pwd. Because when you run on GAE, you don't need this module.

Resources