I'm attempting to get into some opensource projects, and as a QA engineer, have been looking at Appium and Selenium.
Situation: Windows 10
Appium: cloned repo, built successfully
Selenium: cloned, but having troubles.
Installed: Java, JDK, python 3.6, Ruby, Rake gem.
Error, I use go + a target, eg 'go build', 'go' or 'go firefox'. However I'm always getting the following error:
The error:
C:\Users\Mark\selenium>go build
(in C:/Users/Mark/selenium)
python C:/Users/Mark/selenium/buck-out/crazy-fun/7c1417f319649e9fd58fd3f97f36f42c870b1790/buck.pex kill
Traceback (most recent call last):
File "C:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Mark\selenium\buck-out\crazy-fun\7c1417f319649e9fd58fd3f97f36f42c870b1790\buck.pex\__main__.py", line 25, in <module>
File "C:\Users\Mark\selenium\buck-out\crazy-fun\7c1417f319649e9fd58fd3f97f36f42c870b1790\buck.pex\.bootstrap\_pex\pex_bootstrapper.py", line 94, in bootstrap_pex
File "C:\Users\Mark\selenium\buck-out\crazy-fun\7c1417f319649e9fd58fd3f97f36f42c870b1790\buck.pex\.bootstrap\_pex\finders.py", line 218, in register_finders
AttributeError: module 'importlib._bootstrap' has no attribute 'FileFinder'
go aborted!
I'm unable to find anything similar online aside from one post suggesting an issue with older versions of Python potentially. However I've just downloaded the latest, so wouldn't expect an issue...
The Selenium build scripts utilised here (either crazyfunbuild or buckd depending on setup and tools installed) uses Python 2.7 (at time of writing).
A downgrade from 3.6 to 2.7 solved my (python) issues at least.
Related
version information:
ml-agents: 0.29.0,
ml-agents-envs: 0.29.0,
Communicator API: 1.5.0,
PyTorch: 1.7.1+cpu
When I run mlagents-learn it gives me this huge error. A similar error appears also if I use --force, just without the last part.
Traceback (most recent call last):
File "C:\Users\Anton\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\Anton\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Anton\Desktop\Unity\Drone_Ai_v2\venv\Scripts\mlagents-learn.exe\__main__.py", line 7, in <module>
File "c:\users\anton\desktop\unity\drone_ai_v2\venv\lib\site-packages\mlagents\trainers\learn.py", line 260, in main
run_cli(parse_command_line())
File "c:\users\anton\desktop\unity\drone_ai_v2\venv\lib\site-packages\mlagents\trainers\learn.py", line 256, in run_cli
run_training(run_seed, options, num_areas)
File "c:\users\anton\desktop\unity\drone_ai_v2\venv\lib\site-packages\mlagents\trainers\learn.py", line 75, in run_training
checkpoint_settings.maybe_init_path,
File "c:\users\anton\desktop\unity\drone_ai_v2\venv\lib\site-packages\mlagents\trainers\directory_utils.py", line 26, in validate_existing_directories
"Previous data from this run ID was found. "
mlagents.trainers.exception.UnityTrainerException: Previous data from this run ID was found. Either specify a new run ID, use --resume to resume this run, or use the --force parameter to overwrite existing data.
(venv) C:\Users\Anton\Desktop\Unity\Drone_Ai_v2>
I tried using different versions of mlagents and pytorch, but I still get this every time. Could it maybe be my unity version? I'm on 2022.2.0b16
I am also a beginner, and I have encountered the same problem earlier.
The cause of the problem is that the tutorial we read before is outdated, you can try to watch this tutorial: https://www.youtube.com/watch?v=Yix4iV_io6o&t=310s
With some luck, you should be able to run this command successfully ->
mlagents-learn config/ppo/PushBlock.yaml --run-id=push_block_test_01
If there is a huge error message and at it's the bottom that says
TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
, you can use this command
pip install protobuf==3.20.3
to downgrade protobuf, and the problem will be solved. At least that's how my problem was solved.
This solution comes from this page:https://forum.unity.com/threads/typeerror-descriptors-cannot-be-created-directly-error-when-running-mlagents-learn.1399114/
Thank you hughperkins!
I have a python application primarily dependent on matplotlib, tkinter, numpy and scipy I have been distributing for multiple operating systems. I build these on top of the python.org version of python 2.6. For mac, I have had good success in the past with py2app and pyinstaller to build standalone versions of my application. Recently, however, I have included functions that require patsy, pandas and igraph and have had to move to the mac distributed version of python 2.6 in order to get igraph to work. All works fine in building a py2app version of my software on the Mac for my OS (10.6) but when I run on 10.8 I encountered the following error:
Traceback (most recent call last):
File "UI.pyc", line 603 createHeatMap
File "clustering.pyc", line 31, in <module>
File "mpl_toolkits/__init__.pyc", line 2, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 698, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 701, in Environment
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 96, in get_supported_platform
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 222, in get_build_platform
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/util.py", line 98, in get_platform
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py", line 537, in get_config_vars
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py", line 405, in _init_posix
DistutilsPlatformError: invalid Python installation: unable to open /user/include/python2.6/pyconfig.h (No such file or directory)
This is fixed by saving the file pyconfig.h to the designated location on the destination machine (not present in 10.8 but present in 10.6), which allows my application to work fine. In my py2app pacakge directory, under "Contents/Resources" there is a sym-link to the directory "include" which points to: /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h. If I include the pyconfig.h file as an addition resource in my py2app setup file, it also includes it in the package, but it still is not recognized.
Can anyone suggest a good work around for this that doesn't require me to use the python.org version of python (I've had horrible luck getting igraph to work with this).
Thanks...
This is a known issue in py2app, see https://bitbucket.org/ronaldoussoren/py2app/issue/36/py2app-fails-to-build-a-working-executable. The pyconfig.h file is only present on machines where the developer tools are installed, which is why I haven't noticed the problem myself.
The easiest workaround is probably to replace the pyconfig.h symlink by a copy of the file after creating the app bundle.
I don't have experience in downloading libraries, so any help is appreciated. I've got a fresh install of Python3.3 and am trying to get IPython for 64bit Windows 7. The IPython .exe installer ran fine and completed normally, but I can't access the program. I looked through their documentation, and tried the commands there, but
$ python setup.py install
returns invalid syntax, highlighting "setup". I thought the fix might be in the distribute library mentioned on the page, so I went to go try and get that first. However, using the script from distribute's install page revealed it's own errors, namely
Traceback (most recent call last):
File "C:\Python33\distribute_setup.py", line 541, in <module>
sys.exit(main())
File "C:\Python33\distribute_setup.py", line 537, in main
tarball = download_setuptools(download_base=options.download_base)
File "C:\Python33\distribute_setup.py", line 200, in download_setuptools
log.warn("Downloading %s", url)
File "C:\Python33\lib\distutils\log.py", line 47, in warn
self._log(WARN, msg, args)
File "C:\Python33\lib\distutils\log.py", line 30, in _log
if stream.errors == 'strict':
AttributeError: errors
I've been at it for a couple hours now, and I'm fresh out of ideas. What next?
It looks like you ran into Python bug 12967. You need to run distribute_setup.py outside of IDLE (i.e. in a command prompt).
After installing and playing around with web.py this morning, plus installing (unnecessarily) pysqlite on a Python26 install (Windows) the Idle interface will no longer start.
Error code I receive:
C:\Python26>python -m idlelib.idle
Traceback (most recent call last):
File "C:\Python26\lib\runpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python26\lib\runpy.py", line 34, in _run_code
exec code in run_globals
File "C:\Python26\lib\idlelib\idle.py", line 6, in <module>
import PyShell
File "C:\Python26\lib\idlelib\PyShell.py", line 16, in <module>
from code import InteractiveInterpreter
ImportError: cannot import name InteractiveInterpreter
I've tried a few things, including a reinstall of Python 2.6.6. Nothing has restored Idle's ability to run yet.
Anyone have any ideas on what's wrong/how I can fix it?
Sigh...never mind.
The starter walk-through code for web.py suggested you call your file "code.py". Even though I had this file in my own directory outside of the C:\Python26 folder, it was interfering with the code.py that Python expects (which contains the InteractiveInterpreter code.)
Unless this is a cruel joke by the web.py people, I'd suggest that they change what they suggest that you call the example test code name!
I’m new to Python and I’m currently following the Head First Python book. I’m trying to put an example exercise to work but I’m stuck with an error from the GAE.
I installed both Python 2.5 and GAE on my Kubuntu 10.10 S.O.
First I create a folder named “mygaetest” with the files sayhello.py and app.yaml inside.
Because there is no graphical front end for Linux, I start my GAE webapp from the command line this way:
python2.5
google_appengine/dev_appserver.py
home/lucas/workspace/Python/Chapter10/src/mygaetest/
But then the following error is shown:
Traceback (most recent call last):
File
"google_appengine/dev_appserver.py",
line 78, in
run_file(__file__, globals())
File
"google_appengine/dev_appserver.py",
line 74, in run_file
execfile(script_path, globals_)
File
"/home/lucas/Desarrollo/Python/App
Engine/google_appengine/google/appengine/tools/dev_appserver_main.py",
line 118, in
from google.appengine.tools import appcfg
File
"/home/lucas/Desarrollo/Python/App
Engine/google_appengine/google/appengine/tools/appcfg.py",
line 68, in
from google.appengine.tools import appengine_rpc
File
"/home/lucas/Desarrollo/Python/App
Engine/google_appengine/google/appengine/tools/appengine_rpc.py",
line 27, in
import fancy_urllib
File
"/home/lucas/Desarrollo/Python/App
Engine/google_appengine/lib/fancy_urllib/fancy_urllib/init.py",
line 341, in
class FancyHTTPSHandler(urllib2.HTTPSHandler):
AttributeError: 'module' object has no
attribute 'HTTPSHandler'
Can someone tell me what to do in order to solve that error?
Many thanks in advance.
Welcome to Python, App Engine, and Stack Overflow!
Your Python installation apparently lacks SSL support. To add support, install this.
http://code.google.com/p/googleappengine/issues/detail?id=19
I received this error after upgrading Mac OSX to 10.10 (Yosemite), I needed the new build of python 2.7:
$ brew update && brew upgrade python
==> Upgrading 1 outdated package, with result:
python 2.7.8_2
==> Upgrading python
...
==> Summary
/usr/local/Cellar/python/2.7.8_2: 4777 files, 76M
I am using Python 2.7 and I used the following instructions to solve the problem:
http://paltman.com/2007/11/15/getting-ssl-support-in-python-251/