SOAPpy installation error - soappy

Hi i was trying to install SOAPpy module on my mac for python......
i installed xml and fpconst and tried installing this SOAPpy module, but i was getting the error... as below:
venj:SOAPpy-0.12.0 venkata$ python setup.py build
Traceback (most recent call last):
File "setup.py", line 8, in
from SOAPpy.version import version
File "/Applications/SOAPpy-0.12.0/SOAPpy/init.py", line 5, in
from Client import *
File "/Applications/SOAPpy-0.12.0/SOAPpy/Client.py", line 46
from future import nested_scopes
SyntaxError: from future imports must occur at the beginning of the file
venj:SOAPpy-0.12.0 venkata$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 8, in
from SOAPpy.version import version
File "/Applications/SOAPpy-0.12.0/SOAPpy/init.py", line 5, in
from Client import *
File "/Applications/SOAPpy-0.12.0/SOAPpy/Client.py", line 46
from future import nested_scopes
SyntaxError: from future imports must occur at the beginning of the file
Hey please suggest me how to solve this error.

Had the same problem.
You have to "future import" to the beginning of everyfile where it's stated.
There should be a patch for that.

That looks like a bug in SOAP.py from future must be at the beginning of the file SOAP.py bug see python language docs

Related

How to import openpyxl in snow park?

I see that opepyxl is supported in snow flake snowpark python https://repo.anaconda.com/pkgs/snowflake/ but every time I do import inside snowpark, I see the the below error:
Python Interpreter Error: Traceback (most recent call last): File "_udf_code.py", line 4, in ModuleNotFoundError: No module named 'openpyxl' in function MYPROC with handler run
Not sure how to import. Can someone please share how I can use openpyxl in snowpark?
import openpyxl in snowpark and facing the below error:
Python Interpreter Error: Traceback (most recent call last): File "_udf_code.py", line 4, in ModuleNotFoundError: No module named 'openpyxl' in function MYPROC with handler run

from _curses import * ModuleNotFoundError: No module named '_curses

This is the error I am getting:
Traceback (most recent call last):
File "c:\Users\brook\python_practice\snake.py", line 1, in
import curses
File "C:\Users\brook\AppData\Local\Programs\Python\Python310\lib\curses_init_.py", line 13, in
from _curses import *
ModuleNotFoundError: No module named '_curses'
I tried pip install windows-curses and a few other things I found on stack overflow, nothing has worked.
I'm using VSCode.

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

Installing ZPsycopgDA on Zope

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.

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.

Resources