Error in py2app - py2app

I am testing py2app on a simple test.py application, doing nothing special.
python == 3.6
py2app == 0.14
It builds fine with no errors when I give this command:
python3.6 setup.py py2app -A
but when I launch it, this is the result:
./dist/test.app/Contents/MacOS/test
Traceback (most recent call last):
File "/Users/fabio/projvenv/dist/test.app/Contents/Resources/__boot__.py", line 132, in <module>
_run()
File "/Users/fabio/projvenv/dist/test.app/Contents/Resources/__boot__.py", line 126, in _run
exec(compile(source, script, 'exec'), globals(), globals())
File "/Users/fabio/projvenv/test.py", line 3, in <module>
import tkinter
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ValueError: character U+6573552f is not in range [U+0000; U+10ffff]
2017-06-24 11:32:26.266 test[65341:8804502] test Error

downgrading to 0.12 fixed the issue for me. More of a workaround that a fix though but good enough for me at this point

Related

Using dc-app-performance-toolkit with Taurus on windows

I am trying to use https://github.com/atlassian/dc-app-performance-toolkit on windows 10
I have installed taurus from https://gettaurus.org/install/Installation/
jira is installed on my system and i can access it using http://localhost:2990/jira
However when i run bzt jira.yml i am getting below error.
14:43:35 INFO: Starting shell command: python util/post_run/jmeter_post_check.py←[0m
14:43:36 INFO: Starting shell command: python util/jtl_convertor/jtls-to-csv.py kpi.jtl selenium.jtl←[0m
←[33m14:43:36 WARNING: Errors for python util/jtl_convertor/jtls-to-csv.py kpi.jtl selenium.jtl:
Traceback (most recent call last):
File "util/jtl_convertor/jtls-to-csv.py", line 8, in <module>
import pandas
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "C:\Program Files\Taurus\pkgs\numpy\__init__.py", line 138, in <module>
from . import _distributor_init
File "C:\Program Files\Taurus\pkgs\numpy\_distributor_init.py", line 26, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
←[0m
←[31m14:43:36 ERROR: Child Process Error: Test runner selenium (PyTestExecutor) has failed with retcode 1←[0m
←[31m14:43:36 ERROR: PyTestExecutor STDERR:
Traceback (most recent call last):
File "C:\Program Files\Taurus\pkgs\bzt\resources\pytest_runner.py", line 22, in <module>
import pytest
File "C:\Program Files\Taurus\pkgs\pytest\__init__.py", line 7, in <module>
from _pytest.assertion import register_assert_rewrite
File "C:\Program Files\Taurus\pkgs\_pytest\assertion\__init__.py", line 10, in <module>
from _pytest.assertion import rewrite
File "C:\Program Files\Taurus\pkgs\_pytest\assertion\rewrite.py", line 30, in <module>
from _pytest.assertion import util
File "C:\Program Files\Taurus\pkgs\_pytest\assertion\util.py", line 14, in <module>
import _pytest._code
File "C:\Program Files\Taurus\pkgs\_pytest\_code\__init__.py", line 2, in <module>
from .code import Code
File "C:\Program Files\Taurus\pkgs\_pytest\_code\code.py", line 29, in <module>
import pluggy
File "C:\Program Files\Taurus\pkgs\pluggy\__init__.py", line 16, in <module>
from .manager import PluginManager, PluginValidationError
File "C:\Program Files\Taurus\pkgs\pluggy\manager.py", line 11, in <module>
import importlib_metadata
File "C:\Program Files\Taurus\pkgs\importlib_metadata\__init__.py", line 623, in <module>
__version__ = version(__name__)
File "C:\Program Files\Taurus\pkgs\importlib_metadata\__init__.py", line 585, in version
return distribution(distribution_name).version
File "C:\Program Files\Taurus\pkgs\importlib_metadata\__init__.py", line 558, in distribution
return Distribution.from_name(distribution_name)
File "C:\Program Files\Taurus\pkgs\importlib_metadata\__init__.py", line 215, in from_name
raise PackageNotFoundError(name)
importlib_metadata.PackageNotFoundError: No package metadata was found for importlib_metadata←[0m
What am i doing wrong?
The error you're getting is about missing importlib-metadata package, you need to have all the packages listed under requirements.txt installed in order to be able to run these tests, it seems like you omitted Installation and set up chapter
So make sure to execute pip install -r requirements.txt prior to launching the Taurus test as Taurus doesn't take care of dependencies on its own.
More information:
Installing Python Package Dependencies
Navigating your First Steps Using Taurus
I had to remove python installed at
C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\lib\
which was installed prior to bzt
To correct this, I have uninstalled taurus and installed it manually.
Installed python using python-3.8.5-amd64.exe. and not using python-3.8.5.exe

CKAN Docker install seems perfect except ckan container exits immediately after a restart

My CKAN Docker install seems perfect except that the ckan container exits immediately after a restart.strong textI have repeatedly tried a rebuild of the docker containers. I see no errors except a reference to the deprecation of python2. Please advise on any issues that I may have overlooked or something missing. This installation is on Ubuntu 19.10.
docker log is as follows:
Command 'db' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
Traceback (most recent call last):
File "/usr/local/bin/ckan-paster", line 8, in <module>
sys.exit(run())
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 806, in run
command.load().summary))
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2321, in load
return self.resolve()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2327, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/venv/src/ckan/ckanext/datapusher/cli.py", line 7, in <module>
import ckan.lib.cli as cli
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/cli.py", line 17, in <module>
from ckan.cli import load_config as _get_config
File "/usr/lib/ckan/venv/src/ckan/ckan/cli/__init__.py", line 8, in <module>
from configparser import ConfigParser
ImportError: No module named configparser
Command 'db' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
Traceback (most recent call last):
File "/usr/local/bin/ckan-paster", line 8, in <module>
sys.exit(run())
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 806, in run
command.load().summary))
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2321, in load
return self.resolve()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2327, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/venv/src/ckan/ckanext/datapusher/cli.py", line 7, in <module>
import ckan.lib.cli as cli
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/cli.py", line 17, in <module>
from ckan.cli import load_config as _get_config
File "/usr/lib/ckan/venv/src/ckan/ckan/cli/__init__.py", line 8, in <module>
from configparser import ConfigParser
ImportError: No module named configparser
Traceback (most recent call last):
File "/usr/local/bin/ckan-paster", line 8, in <module>
Command 'db' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
sys.exit(run())
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 806, in run
command.load().summary))
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2321, in load
return self.resolve()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2327, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/venv/src/ckan/ckanext/datapusher/cli.py", line 7, in <module>
import ckan.lib.cli as cli
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/cli.py", line 17, in <module>
from ckan.cli import load_config as _get_config
File "/usr/lib/ckan/venv/src/ckan/ckan/cli/__init__.py", line 8, in <module>
from configparser import ConfigParser
ImportError: No module named configparser
You are using python 2.7 but importing configparser, which is Python 3 module. Check which version you are pooling from the Docker, I think you need 2.8.x tag as the latest stable.

Issues installing Drake on Ubuntu 18.04

Followed through installation tips, but after typing
$ python underactuated/src/double_pendulum/simulate.py
I get
ImportError: dynamic module does not define init function (init_module_py).
If I run python3 I get
ImportError: cannot import name 'FindResource'.
After typing $ python3 -c 'import pydrake; print(pydrake.__file__)' I get /opt/drake/lib/python3.6/site-packages/pydrake/__init__.py
Edit:
Full output of running python3
Traceback (most recent call last):
File "underactuated/src/double_pendulum/simulate.py", line 5, in <module>
from underactuated import FindResource, PlanarSceneGraphVisualizer
ImportError: cannot import name 'FindResource'
And full output of running python (without3):
Traceback (most recent call last):
File "underactuated/src/double_pendulum/simulate.py", line 1, in <module>
from pydrake.all import (AddMultibodyPlantSceneGraph,
File "/opt/drake/lib/python3.6/site-packages/pydrake/__init__.py", line 32, in <module>
from . import common
File "/opt/drake/lib/python3.6/site-packages/pydrake/common/__init__.py", line 3, in <module>
from ._module_py import *
ImportError: dynamic module does not define init function (init_module_py)
Version of python after typing python -V is Python 2.7.15+
The fact that the print test succeeds suggests that drake is installed correctly.
Please post the full output of running simulate.py with python3.

How can I fix this error and ingest data from Quandl? Thank you

When I try to run the command in my terminal, it raises an error
I'm using anaconda to install my packages and python 2.7.
$ zipline ingest -b quandl
Traceback (most recent call last):
File "/anaconda3/bin/zipline", line 6, in <module>
from pkg_resources import load_entry_point
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
#_call_aside
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
f(*args, **kwargs)
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mock>=2.0' distribution was not found and is required by tables
It seems you need to install the mock package:
conda install mock
or, if the previous doesn't work:
conda install -c conda-forge mock

ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory Tensorflow

I cannot get it to work! Been trying for almost two days now. Installed Cuda8 and CuDnn 6 - didn't work. added the solution written in ImportError: libcudnn when running a TensorFlow program here.
The error I'm getting -
Traceback (most recent call last):
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/shenath/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/shenath/tensorflow/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
I am new to this. Any help will be really appreciated. If you need anymore info I'll be happy to provide.
Make sure they are in the correct directory after you install cuda and cudnn.
Run the following command after installing cudnn 6. Tensorflow only checks the required file on you cuda directory. So we copy or link the required files from cudnn to that directory.
mkdir /usr/lib/x86_64-linux-gnu/include/ && \
ln -s /usr/lib/x86_64-linux-gnu/include/cudnn.h /usr/lib/x86_64-linux-gnu/include/cudnn.h && \
ln -s /usr/include/cudnn.h /usr/local/cuda/include/cudnn.h && \
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/local/cuda/lib64/libcudnn.so &&
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.6 /usr/local/cuda/lib64/libcudnn.so.6
So, if you are still having that error make sure follow the steps here.

Resources