PloneIDE intallation Error - loops

Running buildout. This might take a while...
While:
Installing ploneide.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/Plone/buildout-cache/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 1942, in main
getattr(buildout, command)(args)
File "/Plone/buildout-cache/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 622, in install
installed_files = self[part]._call(recipe.install)
File "/Plone/buildout-cache/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 1366, in _call
return f()
File "/Plone/zinstance/src/collective.recipe.ploneide/collective/recipe/ploneide/__init__.py", line 200, in install
self.install_developer_manual()
File "/Plone/zinstance/src/collective.recipe.ploneide/collective/recipe/ploneide/__init__.py", line 107, in install_developer_manual
res = subprocess.Popen(cmd, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Buildout.cfg
develop =
src/collective.ploneide
src/collective.recipe.ploneide
parts=
ploneide
[Instance]
[ploneide]
recipe = collective.recipe.ploneide

ploneide may not be super well maintained at this point - last commit from 2012 https://github.com/collective/collective.ploneide
It would help if you posted your buildout.cfg and mentioned which OS you're using.

Related

Running 2 functions at the same time

This is an odd case for me.
The following function rpc_presence which uses the pypresence library: https://qwertyquerty.github.io/pypresence/html/index.html
uses asyncio.
Here's my code:
def stuff():
print("do stuff")
def rpc_presence():
while True: # The presence will stay on as long as the program is running
RPC.update(details="Great", state=random.choice(quotes), large_image="actual_logo")
time.sleep(1)
def main_func():
rpc_thread = thread.Threading(target=rpc_presence)
rpc_thread.start()
stuff_thread = thread.Threading(target=rpc_presence)
stuff_thread.start()
I get the error:
Exception in thread Thread-3:
Traceback (most recent call last):
File "C:\Users\Zylly\AppData\Local\Programs\Python\Python39\lib\threading.py", line 954, in _bootstrap_inner
self.run()
File "C:\Users\Zylly\AppData\Local\Programs\Python\Python39\lib\threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Zylly\Desktop\Sypherus\Sypherus.py", line 29, in rpc_presence_thread
RPC = Presence(client_id,pipe=0)
File "C:\Users\Zylly\AppData\Local\Programs\Python\Python39\lib\site-packages\pypresence\presence.py", line 13, in __init__
super().__init__(*args, **kwargs)
File "C:\Users\Zylly\AppData\Local\Programs\Python\Python39\lib\site-packages\pypresence\baseclient.py", line 40, in __init__
self.update_event_loop(self.get_event_loop())
File "C:\Users\Zylly\AppData\Local\Programs\Python\Python39\lib\site-packages\pypresence\baseclient.py", line 83, in get_event_loop
loop = asyncio.get_event_loop()
File "C:\Users\Zylly\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 642, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Thread-3'.
I spoke to the developer and he said he's not much of an asyncio dev nor a threading dev so he can't really help me.
How can I run this function + another function at the same time, while that other function already uses asyncio.
Feel free to look through the source code of the pypresence library, also, I recommend going through the baseclient.py, especially in the get_event_loop() function.

S3 permission error when running sagemaker python sdk sklearn in local mode

I created a training script with hard coded input. It works as expected using a training job but I couldn't make it work using local mode.
It brings up a container on my local docker and exits with code (1)
Code:
estimator = SKLearn(entry_point="train_model.py",
train_instance_type="local")
estimator.fit()
Here is the exception:
2020-02-22 06:21:05,470 sagemaker-containers INFO Imported framework sagemaker_sklearn_container.training
2020-02-22 06:21:05,480 sagemaker-containers INFO No GPUs detected (normal if no gpus installed)
2020-02-22 06:21:05,504 sagemaker_sklearn_container.training INFO Invoking user training script.
2020-02-22 06:21:06,407 sagemaker-containers ERROR Reporting training FAILURE
2020-02-22 06:21:06,407 sagemaker-containers ERROR framework error:
Traceback (most recent call last):
File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/_trainer.py", line 81, in train
entrypoint()
File "/miniconda3/lib/python3.7/site-packages/sagemaker_sklearn_container/training.py", line 36, in main
train(framework.training_env())
File "/miniconda3/lib/python3.7/site-packages/sagemaker_sklearn_container/training.py", line 32, in train
training_environment.to_env_vars(), training_environment.module_name)
File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/_modules.py", line 301, in run_module
_files.download_and_extract(uri, _env.code_dir)
File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/_files.py", line 129, in download_and_extract
s3_download(uri, dst)
File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/_files.py", line 164, in s3_download
s3.Bucket(bucket).download_file(key, dst)
File "/miniconda3/lib/python3.7/site-packages/boto3/s3/inject.py", line 246, in bucket_download_file
ExtraArgs=ExtraArgs, Callback=Callback, Config=Config)
File "/miniconda3/lib/python3.7/site-packages/boto3/s3/inject.py", line 172, in download_file
extra_args=ExtraArgs, callback=Callback)
File "/miniconda3/lib/python3.7/site-packages/boto3/s3/transfer.py", line 307, in download_file
future.result()
File "/miniconda3/lib/python3.7/site-packages/s3transfer/futures.py", line 106, in result
return self._coordinator.result()
File "/miniconda3/lib/python3.7/site-packages/s3transfer/futures.py", line 265, in result
raise self._exception
File "/miniconda3/lib/python3.7/site-packages/s3transfer/tasks.py", line 255, in _main
self._submit(transfer_future=transfer_future, **kwargs)
File "/miniconda3/lib/python3.7/site-packages/s3transfer/download.py", line 345, in _submit
**transfer_future.meta.call_args.extra_args
File "/miniconda3/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/miniconda3/lib/python3.7/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
An error occurred (403) when calling the HeadObject operation: Forbidden
tmpe_msr8pi_algo-1-kt1vh_1 exited with code 1
I found out that docker restart solved the issue.
After a while it happened again - and it solved it again.
I'm using docker for windows, and the issue is probably related to the created container configuration

Executable path error while using chrome driver with selenium

I am trying to open chrome using selenium but getting this error . I have tried many ways but still this issue is not resolved.
Traceback (most recent call last):
File "sl.py", line 11, in <module>
chrome.Initialize()
File "/home/daffolap/api_test/api_test/utils.py", line 14, in Initialize
driver = webdriver.Chrome(executable_path=r"/home/daffolap/api_test/chromedriver2.exe")
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver`enter code here`2.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
driver=None
class Webbrowser:
#staticmethod
def Initialize():
global driver
driver = webdriver.Chrome(executable_path=r"/home/daffolap/api_test/chromedriver2.exe")
driver.maximize_window()
driver.implicitly_wait(5)
return driver

‘platform’ import disappearing from selenium as a result of my script

Linux ip-172-31-36-170 3.10.35-43.137.amzn1.x86_64 #1 SMP Wed Apr 2 09:36:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Amazon Linux AMI release 2014.03
cpe:/o:amazon:linux:2014.03:ga
I've run into a weird problem with a script that uses selenium.webdriver.PhantomJS.
SYMPTOMS…
My script uses the following to start a phantomjs session
from selenium import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
(…)
def load_driver(self, _driver = "phantomjs", _path = "./phantomjs"):
if "phantom" in str(_driver).lower():
self.driver = webdriver.PhantomJS(_path)
Fails with:
selenium.common.exceptions.WebDriverException: Message: 'Unable to start phantomjs with ghostdriver.' ; Screenshot: available via screen
HOWEVER, at the python command line, everything works fine…
from selenium import webdriver
_path = './phantomjs.exe'
driver = webdriver.PhantomJS(_path)
PLATFORM: Linux
platform.system() != 'Windows': True
(I’ll explain “PLATFORM: Linux”, and “platform.system() != 'Windows': True” below)
SO…
I traced the error to the “/usr/lib/python2.6/site-packages/selenium/webdriver/phantomjs/service.py” and specifically this code…
def start(self):
"""
"""
try:
print "PLATFORM:", platform.system() #ADDED BY ME
# FOLLOWING ADDED BY ME, NOW CAUSING THE ERROR
print "platform.system() != 'Windows': ", platform.system() != 'Windows'
self.process = subprocess.Popen(self.service_args, stdin=subprocess.PIPE,
close_fds=platform.system() != 'Windows', # <-- THIS CAUSED ORIG PROB
stdout=self._log, stderr=self._log)
except Exception as e:
raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
AND HERE’S THE ISSUE…
When I run the code at the python command line (see above) everything is fine, AND the responses to ‘platform.system()’ and “platform.system() != 'Windows' ” are correct.
However, when I run my script, the ‘platform.system()’ reports blank and “platform.system() != 'Windows' ” errors. (See actual output below).
So, for some reason, when my script loads selenium and runs…THE SELENIUM CODE loses the ‘platform’ import.
Thanks for the help!
ACTUAL OUTPUT BELOW (NOTICE that 'PLATFORM:' is followed by 'blank' (instead of 'Linux'), and the next line “platform.system() != 'Windows' ” triggers the error. These lines were added by me into the SELENIUM code, not my code!)
PLATFORM:
Traceback (most recent call last):
File "./agmarknet.py", line 834, in <module>
username = options.username # --username
File "./agmarknet.py", line 124, in __init__
self.load_driver(driver, driver_path)
File "./agmarknet.py", line 521, in load_driver
self.driver = webdriver.PhantomJS(_path)
File "/usr/lib/python2.6/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 50, in __init__
self.service.start()
File "/usr/lib/python2.6/site-packages/selenium/webdriver/phantomjs/service.py", line 64, in start
print "PLATFORM:", platform.system() #333
File "/usr/lib64/python2.6/platform.py", line 1272, in system
return uname()[0]
File "/usr/lib64/python2.6/platform.py", line 1239, in uname
processor = _syscmd_uname('-p','')
File "/usr/lib64/python2.6/platform.py", line 995, in _syscmd_uname
output = string.strip(f.read())
File "./agmarknet.py", line 350, in _signal_handler
self._cleanup()
File "./agmarknet.py", line 194, in _cleanup
self.driver.close()
AttributeError: 'Agmarknet' object has no attribute 'driver'
2014-05-18 12:42:40,281 - Agmarknet - INFO - Closing WebDriver...
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib64/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "./agmarknet.py", line 194, in _cleanup
self.driver.close()
AttributeError: 'Agmarknet' object has no attribute 'driver'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib64/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "./agmarknet.py", line 194, in _cleanup
self.driver.close()

Go AppEngine remote_api sample not working

Are the Go AppEngine samples up to date?
I'm running into issues getting example/remote_api/datastore_info.go working for my test AppEngine running on localhost.
I've changed the client.PostForm from:
resp, err := client.PostForm("https://www.google.com/accounts/ClientLogin", v)
to:
resp, err := client.PostForm("http://localhost:35058/_ah/remote_api", v)
(35058 is the port reported for api_server during startup).
I've tried both 1.9.3 and latest 1.9.4 versions.
The api server reports:
ERROR 2014-05-06 20:57:56,378 api_server.py:215] Exception while handling
Traceback (most recent call last):
File "/root/go_appengine/google/appengine/tools/devappserver2/api_server.py", line 194, in _handle_POST
request.ParseFromString(wsgi_input)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 88, in ParseFromString
self.MergeFromString(s)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 95, in MergeFromString
self.MergePartialFromString(s)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 109, in MergePartialFromString
self.TryMerge(d)
File "/root/go_appengine/google/appengine/ext/remote_api/remote_api_pb.py", line 210, in TryMerge
d.skipData(tt)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 529, in skipData
self.skipData(t)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 529, in skipData
self.skipData(t)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 537, in skipData
raise ProtocolBufferDecodeError, "corrupted"
ProtocolBufferDecodeError: corrupted
There were some bug fixes in 1.9.6; can you try with the latest SDK?
I've been exactly the same problem in whatever call to my development server
Traceback (most recent call last):
File "/home/mike/go_appengine/google/appengine/tools/devappserver2/api_server.py", line 238, in _handle_POST
request.ParseFromString(wsgi_input)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 140, in ParseFromString
self.MergeFromString(s)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 152, in MergeFromString
self.MergePartialFromString(s)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 168, in MergePartialFromString
self.TryMerge(d)
File "/home/mike/go_appengine/google/appengine/ext/remote_api/remote_api_pb.py", line 210, in TryMerge
d.skipData(tt)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 677, in skipData
raise ProtocolBufferDecodeError, "corrupted"
ProtocolBufferDecodeError: corrupted
I've go version go1.4.2 (appengine-1.9.24) linux/amd64
Problem was I'm using the IP for "API" instead the IP for default module
INFO 2015-08-13 19:42:03,901 devappserver2.py:763] Skipping SDK update check.
INFO 2015-08-13 19:42:03,947 api_server.py:205] Starting API server at: http://localhost:60852
INFO 2015-08-13 19:42:03,971 dispatcher.py:197] Starting module "default" running at: http://localhost:49333
INFO 2015-08-13 19:42:03,972 admin_server.py:118] Starting admin server at: http://localhost:8000
You must use module host/por to place calls to your go application; API ip is for remote api, I think.

Resources