I have been trying to install SerpentAI. I am on a Mac, and I have followed all the steps. I have all the dependencies, but when I use the keyword serpent it gives me this error.
I know I am missing a config file but I don't know where to find it, or how to solve this.
Any command that started with serpent gave me this error.
Here is the error
Traceback (most recent call last):
File "/anaconda3/bin/serpent", line 11, in <module>
load_entry_point('SerpentAI==2018.1.2', 'console_scripts', 'serpent')()
File "/anaconda3/lib/python3.6/site- packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
return ep.load()
File "/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2322, in load
return self.resolve()
File "/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2328, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/anaconda3/lib/python3.6/site-packages/SerpentAI-2018.1.2-py3.6.egg/serpent/serpent.py", line 11, in <module>
from serpent.utilities import clear_terminal, display_serpent_logo, is_linux, is_macos, is_windows, is_unix, wait_for_crossbar
File "/anaconda3/lib/python3.6/site-packages/SerpentAI-2018.1.2-py3.6.egg/serpent/utilities.py", line 8, in <module>
from serpent.config import config
File "/anaconda3/lib/python3.6/site-packages/SerpentAI-2018.1.2-py3.6.egg/serpent/config.py", line 18, in <module>
raise Exception("Configuration file not found at: 'config/config.yml'...")
Exception: Configuration file not found at: 'config/config.yml'...
So I think I found the problem, you can clone the GitHub repo, and it will have the config files. Then when you run pip install it will clone a version, and that version won't have the config files.
I had the same issue when trying to run serpent vi sual_debugger after following all installation guide steps.
Try to run serpent setup, it might solve the problem you have. It helped in my case.
Related
I have installed lektor via freebsd ports, there was no error. lektor quickstart also created my project but after I would like to start lektor server no matter which folder I am in or which flags do I add, I get this error:
Traceback (most recent call last):
File "/usr/local/bin/lektor", line 33, in <module>
sys.exit(load_entry_point('Lektor==3.2.2', 'console_scripts', 'lektor')())
File "/usr/local/lib/python3.9/site-packages/lektor/cli.py", line 766, in main
cli.main(args=args, prog_name=name)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/lektor/cli.py", line 471, in server_cmd
from lektor.devserver import run_server
File "/usr/local/lib/python3.9/site-packages/lektor/devserver.py", line 9, in <module>
from lektor.admin import WebAdmin
File "/usr/local/lib/python3.9/site-packages/lektor/admin/__init__.py", line 1, in <module>
from .webui import WebAdmin
File "/usr/local/lib/python3.9/site-packages/lektor/admin/webui.py", line 7, in <module>
from flask.helpers import safe_join
ImportError: cannot import name 'safe_join' from 'flask.helpers' (/usr/local/lib/python3.9/site-packages/flask/helpers.py)
I did everything as it was described in quick start, so this is just a default installation. My os version is:
FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64
And my installed lektor version is:
Lektor, version 3.2.2
How should I fix this? Is that a known bug? I didn't found anything usefull while googleing.
Looks like somebody reported this as a freebsd bug. Appling the fix: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263922 will update it to new version of lektor and the server will also work.
I'm on MacOS Big Sur trying to run rfcat. I am running anaconda as well and I have set up an environment with Python2.7 when I originally got errors with Python3.x. I have downloaded the pyusb, pyreadline, ipython, PySide2, and the libusb dependancies. Libusb seems to be giving me the most trouble. I keep getting the following error:
Error in resetup():NoBackendError('No backend available',)
Error in resetup():NoBackendError('No backend available',)
Error in resetup():NoBackendError('No backend available',)
^CTraceback (most recent call last):
File "/opt/anaconda3/envs/rftools/bin/rfcat", line 4, in <module>
__import__('pkg_resources').run_script('rfcat==1.9.5', 'rfcat')
File "/opt/anaconda3/envs/rftools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/opt/anaconda3/envs/rftools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1469, in run_script
exec(script_code, namespace, namespace)
File "/opt/anaconda3/envs/rftools/lib/python2.7/site-packages/rfcat-1.9.5-py2.7.egg/EGG-INFO/scripts/rfcat", line 63, in <module>
File "build/bdist.macosx-10.7-x86_64/egg/rflib/__init__.py", line 208, in interactive
File "build/bdist.macosx-10.7-x86_64/egg/rflib/chipcon_nic.py", line 103, in __init__
File "build/bdist.macosx-10.7-x86_64/egg/rflib/chipcon_usb.py", line 93, in __init__
File "build/bdist.macosx-10.7-x86_64/egg/rflib/chipcon_usb.py", line 238, in resetup
KeyboardInterrupt
From my research so far, backend is how pyusb refers to libusb, libusb1 or openusb. It is unable to find the libusb within the environment. I did a little tracking and found that ultimately, the find_library() function is found in ctypes in util.py. It refers to the executable path for MacOS with #executable_path/../lib/libusb%s..... I tried to put libusb into a folder on my executable path to hopefully match this functions search, and still got the same errors. I then found instructions on inputting a custom path for the backend for pyusb here. This appears to be a method where you input the device and backend information at the beginning of your program. The code I inserted is as follows:
import usb.core
import usb.backend.libusb1 as libusb1
backend = libusb1.get_backend(find_library=lambda x: "/path/to/file/lib/libusb-1.0.0.dylib")
dev = usb.core.find(idVendor=“MyVID”, idProduct=“MyPID”, backend=backend)
This induced a similar error but with a different traceback when I placed the code in rflib.init and the rfcat codes:
Traceback (most recent call last):
File "/opt/anaconda3/envs/rftools/bin/rfcat", line 4, in <module>
__import__('pkg_resources').run_script('rfcat==1.9.5', 'rfcat')
File "/opt/anaconda3/envs/rftools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/opt/anaconda3/envs/rftools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1469, in run_script
exec(script_code, namespace, namespace)
File "/opt/anaconda3/envs/rftools/lib/python2.7/site-packages/rfcat-1.9.5-py2.7.egg/EGG-INFO/scripts/rfcat", line 12, in <module>
File "build/bdist.macosx-10.7-x86_64/egg/rflib/__init__.py", line 15, in <module>
File "/opt/anaconda3/envs/rftools/lib/python2.7/site-packages/usb/core.py", line 1304, in find
raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available
I have since reset things back to how I started and am still getting the original error listed above.
I think this largely has to do with the anaconda environment, which I can of course remove. I want to try to find a way to make this work though. Is there a better method to help rfcat find the libusb as required? Another possible solution is resolving the actual executable_path. Does anyone know how to find the executable_path?
In case it helps, I will list the default locations for commands and files.
rfcat: /opt/anaconda3/envs/rftools/lib/python2.7/site-packages/rfcat
pyusb: /opt/anaconda3/envs/rftools/lib/python2.7/site-packages/usb
ctypes: /opt/anaconda3/envs/rftools/lib/python2.7/ctypes
libusb: /opt/anaconda3/envs/rftools/lib/python2.7/site-packages/usb/lib
I've written a python script using scrapy to crawl a site, and I'm trying to set up a job through jenkins to call the script nightly (this way it's very easy to see the output).
The machine I'm running jenkins on is a bitnami VM inside google compute.
I set up the command to run through the shell command in jenkins, and it's failing with the following error:
Building on master in workspace /opt/bitnami/apps/jenkins/jenkins_home/jobs/Scrape and Import myco/workspace [workspace] $ /bin/sh -xe /opt/bitnami/apache-tomcat/temp/hudson4165433582945317339.sh
+ /usr/local/myco/myscript.py -l /usr/local/myco/results/7.log -o /usr/local/myco/results/7.json -s /usr/local/myco/results/7.stats myspider
Traceback (most recent call last): File "/usr/local/myco/myscript.py", line 5, in <module>
from twisted.internet import reactor File "/usr/local/lib/python2.7/dist-packages/twisted/internet/reactor.py", line 38, in <module>
from twisted.internet import default File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", line 56, in <module>
install = _getInstallFunction(platform) File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.epollreactor import install File "/usr/local/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 24, in <module>
from twisted.internet import posixbase File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 23, in <module>
from twisted.internet import error, udp, tcp File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 29, in <module>
from twisted.internet._newtls import ( File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_newtls.py", line 21, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/tls.py", line 41, in <module>
from OpenSSL.SSL import Error, ZeroReturnError, WantReadError File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL File "/usr/local/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
from OpenSSL._util import ( File "/usr/local/lib/python2.7/dist-packages/OpenSSL/_util.py", line 7, in <module>
binding = Binding() File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 114, in __init__
self._ensure_ffi_initialized() File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 126, in _ensure_ffi_initialized
cls._modules, File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/utils.py", line 31, in load_library_for_binding
lib = ffi.verifier.load_library() File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 97, in load_library
return self._load_library() File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 207, in _load_library
return self._vengine.load_library() File "/usr/local/lib/python2.7/dist-packages/cffi/vengine_cpy.py", line 155, in load_library
raise ffiplatform.VerificationError(error) cffi.ffiplatform.VerificationError: importing '/usr/local/lib/python2.7/dist-packages/cryptography/_Cryptography_cffi_e7d09016xc302a38b.so': /usr/local/lib/python2.7/dist-packages/cryptography/_Cryptography_cffi_e7d09016xc302a38b.so: symbol EC_GFp_nistp521_method, version OPENSSL_1.0.1 not defined in file libcrypto.so.1.0.0 with link time reference Build step 'Execute shell' marked build as failure Finished: FAILURE
I'm perplexed because when I run the same command (as my user and the user jenkins is running under, tomcat) I don't get this error, the script works fine.
I suspect this may have to do with the script being executed inside apache, but I'm at my wits end and googling hasn't turned up any obvious solutions.
Any idea as to how to solve this?
symbol EC_GFp_nistp521_method, version OPENSSL_1.0.1 not defined in file libcrypto.so.1.0.0
It looks like you are running a python compiled with OpenSSL 1.0.1 with a libcrypto from OpenSSL 1.0.0. It might be because you are running with a different python (at least compiled against a different OpenSSL version) but include files from your local python installation which expects the newer OpenSSL.
I have been having all kinds of problems getting Windmill setup and installed. I thought I finally got it setup, but now when I try to just run windmill, I get the following errors. Any help is appreciated.
c:\Python33\Scripts>windmill firefox http://www.google.com Traceback
(most recent call last): File
"c:\Python33\Scripts\windmill-script.py", line 9, in
load_entry_point('windmill==1.6', 'console_scripts', 'windmill')() File
"C:\Python33\lib\site-packages\distribute-0.6.49-py3.3.egg\pkg_resources.
py", line 345, in load_entry_point
return get_distribution(dist).load_entry_point(group, name) File "C:\Python33\lib\site-packages\distribute-0.6.49-py3.3.egg\pkg_resources.
py", line 2382, in load_entry_point
return ep.load() File "C:\Python33\lib\site-packages\distribute-0.6.49-py3.3.egg\pkg_resources.
py", line 2088, in load
entry = import(self.module_name, globals(),globals(), ['name']) File
"C:\Python33\lib\site-packages\windmill-1.6-py3.3.egg\windmill__init__.p
y", line 17, in
import bin, browser, server, conf, tools, sys ImportError: No module named 'bin'
I had the same issue; Windmill doesn't work with Python 3.x. To fix the problem install Python 2.x
Using cx_freeze under ubuntu 12.04. The generation of the package is
done without any errors but when I try to run the package as a
standalone, I get the following error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/cx_Freeze/initscripts /Console.py",
line 27, in <module>
exec code in m.__dict__
m m File "Setup_cx_freeze.py", line 3, in <module>
File "/usr/local/lib/python2.7/dist-packages/cx_Freeze/__init__.py",
line 4, in <module>
from cx_Freeze.dist import *
File "/usr/local/lib/python2.7/dist-packages/cx_Freeze/dist.py",
line 3, in <module>
import distutils.command.install
File "/usr/lib/python2.7/distutils/command/install.py", line 21, in <module>
from site import USER_BASE
File "/usr/lib/python2.7/site.py", line 562, in <module>
main()
File "/usr/lib/python2.7/site.py", line 540, in main
abs__file__()
File "/usr/lib/python2.7/site.py", line 100, in abs__file__
m.__file__ = os.path.abspath(m.__file__)
File "/usr/lib/python2.7/email/__init__.py", line 79, in __getattr__
__import__(self.__name__)
ImportError: No module named image
I think what to focus on is the last sentence. "ImportError: No module named image."
The application runs without any problems in pure python environment
So why do I get the Error when running it as a "freeze" package? The
fault is somehow introduced when generating the freeze-package.
I ended up fixing this by explicitly including the package "email.mime" in the setup.py script build exe options.
Missing 'image' is just first part of the problem. Try to add this to your code:
from email.mime.image import MIMEImage
from email.mime.audio import MIMEAudio
from email.mime.message import MIMEMessage
This resolved problems with 'image', 'audio' and 'message'.
Resolved this by installing Python Imaging Library: http://www.pythonware.com/products/pil/
1) python setup.py build
2) sudo python setup.py install