bacon
bacon copied to clipboard
import issue on OSX (ValueError: level must be >= 0)
Hi aholkner!
First off, thanks for this nice package, I'm looking forward to using it!
I encountered the following problem, that you might want to know about:
(py3env) me@myhost:~./$ pip install -U bacon
Collecting bacon
Installing collected packages: bacon
Successfully installed bacon-0.3.1
Opening python and importing bacon:
(py3env) me@myhost:~./$ python
Python 3.6.1 (default, Apr 17 2017, 08:59:54)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.41)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bacon
WARNING: No logging configuration for "bacon" set; using default
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mskoenz/.virtualenvs/py3env/lib/python3.6/site-packages/bacon/__init__.py", line 4, in <
module>
from bacon.all import *
File "/Users/mskoenz/.virtualenvs/py3env/lib/python3.6/site-packages/bacon/all.py", line 1, in <modul
e>
from bacon.core import *
File "/Users/mskoenz/.virtualenvs/py3env/lib/python3.6/site-packages/bacon/core.py", line 152, in <mo
dule>
lib = native.load(function_wrapper = _error_wrapper)
File "/Users/mskoenz/.virtualenvs/py3env/lib/python3.6/site-packages/bacon/native.py", line 493, in l
oad
_lib = _dll_path.get_lib()
File "/Users/mskoenz/.virtualenvs/py3env/lib/python3.6/site-packages/bacon/native.py", line 428, in g
et_lib
dll_dir = self.get_dir()
File "/Users/mskoenz/.virtualenvs/py3env/lib/python3.6/site-packages/bacon/native.py", line 396, in g
et_dir
_pkg_resources = __import__('pkg_resources', globals(), locals(), [], -1)
ValueError: level must be >= 0
I'm running:
- virtual-env python3.6
- sys.platform="darwin"
- OSX10.12.6, MacBook Pro (13-inch, 2016)
Hope this helps and best regards mskoenz
EDIT:
import logging
logging.getLogger('bacon').addHandler(logging.NullHandler())
import bacon
yields the same behavior
EDIT2:
I was able to "solve" it by hardcoding (native.py)_DLLPath.get_dir(self) to return the path to Bacon64.dynlib, seems like a python2/3 issue maybe?
how do you solve that problem ? I couldn't solve it just by changing the function , i tried and it give me new errors , can you help me ?