Cloud Control Error cctrluser key.add - cloudcontrol

I installed cctrl and tried to create a public key, I typed cctrluser key.add at Command Prompt, I received error. Could someone please help?
C:\Users\sumit>cctrluser key.add
Key 'C:\Users\sumit/.ssh/id_rsa.pub' seems to be invalid or not found!
Type "Yes" to generate a new default SSH-key pair: yes
Traceback (most recent call last):
File "cctrluser", line 150, in <module>
File "cctrluser", line 34, in main
File "cctrluser", line 144, in parse_cmdline
File "cctrl\common.pyo", line 99, in run
File "cctrl\user.pyo", line 124, in addKey
File "cctrl\keyhelpers.pyo", line 149, in create_new_default_ssh_keys
File "cctrl\keyhelpers.pyo", line 57, in generate_rsa_keys
File "cctrl\keyhelpers.pyo", line 85, in generate_rsa_key_manually
File "cctrl\keyhelpers.pyo", line 101, in generate_private_rsa_key_file
File "paramiko\__init__.pyo", line 65, in <module>
File "paramiko\transport.pyo", line 45, in <module>
File "paramiko\ecdsakey.pyo", line 24, in <module>
ImportError: No module named ecdsa

I found a solution .
Get Git Bash.
Then use the following command :
$ ssh-keygen -C youremail#provider.com
Save the ssh created into id_rsa ( default, suggested place )
youremail#provider.com is the email you used to create the cloudcontrol account .
Then go into your cloudcontrol account and add the content of the ~/.ssh/id_rsa.pub in the SSH keys input .

New cctrl version has been released today with fixed ecdsa dependency, so automatic ssh key generation is supported again.

Related

Script compiled with pyinstaller is missing a .dll file, when the file is manually copied in the program's folder it just dies

I have a python script which is basically a graphic interface (pysimpleguy) to a mysql database.
I am working in python 3.8; my dependencies are:
PySimpleGUI 4.55.1
sqlalchemy 1.3.20
pymysql 1.0.2
pandas 1.1.3
regex 2020.10.15
pillow 8.0.1
The code works and I'd like to compile it to .exe to distribute it to users in my organization.
I tried to compile it with:
pyinstaller -D .\db_interface_v3.6.1_release.py --debug=imports
However, pyinstaller throws some errors when compiling:
201667 INFO: Building COLLECT COLLECT-00.toc
Traceback (most recent call last):
File "c:\users\spit\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\spit\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Spit\anaconda3\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "c:\users\spit\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 124, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\spit\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 58, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\spit\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 782, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\spit\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 714, in build
exec(code, spec_namespace)
File "C:\Users\Spit\Desktop\DIPEx db parser\db_interface_v3.6.1_release.spec", line 37, in <module>
coll = COLLECT(exe,
File "c:\users\spit\anaconda3\lib\site-packages\PyInstaller\building\api.py", line 818, in __init__
self.__postinit__()
File "c:\users\spit\anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 155, in __postinit__
self.assemble()
File "c:\users\spit\anaconda3\lib\site-packages\PyInstaller\building\api.py", line 866, in assemble
shutil.copy(fnm, tofnm)
File "c:\users\spit\anaconda3\lib\shutil.py", line 415, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "c:\users\spit\anaconda3\lib\shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Spit\\Desktop\\DIPEx db parser\\dist\\db_interface_v3.6.1_release\\share\\jupyter\\lab\\staging\\node_modules\\.cache\\terser-webpack-p
lugin\\content-v2\\sha512\\2e\\ba\\cfce62ec1f408830c0335f2b46219d58ee5b068473e7328690e542d2f92f2058865c600d845a2e404e282645529eb0322aa4429a84e189eb6b58c1b97c1a'
If I try to run the compiled exe, I get an error regarding a specific .dll:
INTEL MKL ERROR: Impossibile trovare il modulo specificato. mkl_intel_thread.dll.
Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.
If I take this missing .dll from my Anaconda environment and copy it into the program's folder, when I try to run the .exe again it just dies without further messages:
import 'numpy.ma' # <pyimod03_importers.FrozenImporter object at 0x000001F6A455BEE0>
PS C:\Users\Spit\Desktop\DIPEx db parser\dist\db_interface_v3.6.1_release>
Any idea on how to sort it out?
Thanks!
Sorted out. As a future reference if someone stumbles upon this question, the error is caused by Windows' PATH_MAX limitation, preventing pyinstaller to find all the necessary files.
In order to disable said limitation: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd
Kudos to https://github.com/bwoodsend

RobotFramework - Importing test library "AutoItLibrary" failed: Initializing test library 'AutoItLibrary' with no arguments failed

Can anyone support me this case?
I install Robotframework to a machine (win10 64b). The versions in my machine:
Python3.7.2 (32b)
pywin32==224 (32b)
robotframework==3.1.1
robotframework-autoitlibrary==1.2.3
robotframework-ride==1.7.3.1
robotframework-seleniumlibrary==3.3.1
wxPython==4.0.4 (32b)
Import AutoItLibary, it is always red, Ride error log shows:
Traceback (most recent call last):
Initializing test library 'AutoItLibrary' with no arguments failed: RobotNotRunningError: Cannot access execution context
Traceback (most recent call last):
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 167, in _get_instance
return libcode(*self.positional_args, **dict(self.named_args))
File "c:\python37-32\lib\site-packages\AutoItLibrary\__init__.py", line 88, in __init__
self._OutputDir = self._get_log_dir()
File "c:\python37-32\lib\site-packages\AutoItLibrary\__init__.py", line 182, in _get_log_dir
variables = BuiltIn().get_variables()
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 1293, in get_variables
return self._variables.as_dict(decoration=is_falsy(no_decoration))
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 75, in _variables
return self._namespace.variables
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 71, in _namespace
return self._get_context().namespace
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 66, in _get_context
raise RobotNotRunningError('Cannot access execution context')
File "c:\python37-32\lib\site-packages\robotide\spec\librarymanager.py", line 87, in _fetch_keywords
return get_import_result(path, library_args)
File "c:\python37-32\lib\site-packages\robotide\spec\libraryfetcher.py", line 24, in get_import_result
lib = robotapi.TestLibrary(path, args)
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 54, in TestLibrary
lib.create_handlers()
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 100, in create_handlers
self._create_handlers(self.get_instance())
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 159, in get_instance
self._libinst = self._get_instance(self._libcode)
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 169, in _get_instance
self._raise_creating_instance_failed()
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 314, in _raise_creating_instance_failed
% (self.name, args_text, msg, details))
20190326 17:31:22.876 [INFO]: Found Robot Framework version 3.1.1 from c:\python37-32\lib\site-packages\robot.
20190326 17:31:22.876 [INFO]: Started RIDE 1.7.3.1 using python version 3.7.2 with wx version 4.0.4 in win32. ```
I had the same problem with the robotframework-autoitlibrary.
The way I found to fix and use autoit in RF was to uninstall the "robotframework-autoitlibrary" and install the "autoitlibrary" found here: https://code.google.com/archive/p/robotframework-autoitlibrary/ with python setup.py install as Admin.
Initializing error is now gone.
AutoItLibrary is not built in with robot framework you need to import the library.
pip install robotframework-autoitlibrary

mac: py2app not finding cacert.pem

My app created with py2app is not able to find cacert.pem. The error stack shown below says it's looking into the zip file in the app bundle. I checked the zip file and the cacert.pem seems to be in the right place.
I have tried the solution suggested here to copy cacert.pem to the requests package so it can be found during p2app compile, with no success.
I am using Anaconda with python 3.5 on Mac.
Any ideas?
File "/Users/chuck/Documents/patelco/monitor/dist/monitor.app/Contents/Resources/__boot__.py", line 98, in <module>
_run()
File "/Users/chuck/Documents/patelco/monitor/dist/monitor.app/Contents/Resources/__boot__.py", line 82, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Users/chuck/Documents/patelco/monitor/dist/monitor.app/Contents/Resources/monitor.py", line 82, in <module>
send_text_message(report_text)
File "/Users/chuck/Documents/patelco/monitor/dist/monitor.app/Contents/Resources/monitor.py", line 46, in send_text_message
message = client.messages.create(to="+1510845xxxx", from_="+1415758xxxx", body=msg)
File "twilio/rest/api/v2010/account/message/__init__.pyc", line 92, in create
File "twilio/base/version.pyc", line 205, in create
File "twilio/base/version.pyc", line 47, in request
File "twilio/base/domain.pyc", line 46, in request
File "twilio/rest/__init__.pyc", line 122, in request
File "twilio/http/http_client.pyc", line 68, in request
File "requests/sessions.pyc", line 618, in send
File "requests/adapters.pyc", line 407, in send
File "requests/adapters.pyc", line 226, in cert_verify
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: /Users/chuck/Documents/patelco/monitor/dist/monitor.app/Contents/Resources/lib/python35.zip/certifi/cacert.pem
This was a bug in requests that was recently fixed but has not made it to a release version yet. If you are ok with using a development version of requests, you can install from the github repo (upgrading if already present) so that when you build your app you have the latest version with this fix:
pip install -U https://github.com/requests/requests/zipball/master

KeyError: 'ibm_db_sa' when trying to use db2 with Apache Airflow

I've setup a database connection using sql_alchemy_conn = ibm_db_sa://{USERNAME}:{PASSWORD}#{HOST}:50000/airflow in the airflow.cfg file.
When I run airflow initdb, it pops up KeyError: 'ibm_db_sa'. How can I use a DB2 connection with Airflow?
===============
Here is more specific error message:
airflow initdb
[2017-02-01 15:55:57,135] {__init__.py:36} INFO - Using executor SequentialExecutor
DB: ibm_db_sa://db2inst1:***#localhost:50000/airflow
[2017-02-01 15:55:58,151] {db.py:222} INFO - Creating tables
Traceback (most recent call last):
File "/opt/anaconda/bin/airflow", line 15, in <module>
args.func(args)
File "/opt/anaconda/lib/python2.7/site-packages/airflow/bin/cli.py", line 524, in initdb
db_utils.initdb()
File "/opt/anaconda/lib/python2.7/site-packages/airflow/utils/db.py", line 106, in initdb
upgradedb()
File "/opt/anaconda/lib/python2.7/site-packages/airflow/utils/db.py", line 230, in upgradedb
command.upgrade(config, 'heads')
File "/opt/anaconda/lib/python2.7/site-packages/alembic/command.py", line 174, in upgrade
script.run_env()
File "/opt/anaconda/lib/python2.7/site-packages/alembic/script/base.py", line 416, in run_env
util.load_python_file(self.dir, 'env.py')
File "/opt/anaconda/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
module = load_module_py(module_id, path)
File "/opt/anaconda/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/opt/anaconda/lib/python2.7/site-packages/airflow/migrations/env.py", line 74, in <module>
run_migrations_online()
File "/opt/anaconda/lib/python2.7/site-packages/airflow/migrations/env.py", line 65, in run_migrations_online
compare_type=COMPARE_TYPE,
File "<string>", line 8, in configure
File "/opt/anaconda/lib/python2.7/site-packages/alembic/runtime/environment.py", line 773, in configure
opts=opts
File "/opt/anaconda/lib/python2.7/site-packages/alembic/runtime/migration.py", line 159, in configure
return MigrationContext(dialect, connection, opts, environment_context)
File "/opt/anaconda/lib/python2.7/site-packages/alembic/runtime/migration.py", line 103, in __init__
self.impl = ddl.DefaultImpl.get_by_dialect(dialect)(
File "/opt/anaconda/lib/python2.7/site-packages/alembic/ddl/impl.py", line 65, in get_by_dialect
return _impls[dialect.name]
KeyError: 'ibm_db_sa'
Did you install the required package for db2? Eg. pip install ibm_db_sa. By the way the pypi page lists that it is only compatible with python 3.
Please note that db2 is not officially supported as a backend for Airflow.

Plone buildout error non-existant file

I have a Plone 4.3.3 site that is throwing an error on buildout:
Traceback (most recent call last):
File "/usr/local/Proforest4.3/buildout-cache/eggs/zc.buildout-2.2.5-py2.7.egg/zc/buildout/buildout.py", line 1946, in main
getattr(buildout, command)(args)
File "/usr/local/Proforest4.3/buildout-cache/eggs/zc.buildout-2.2.5-py2.7.egg/zc/buildout/buildout.py", line 626, in install
installed_files = self[part]._call(recipe.install)
File "/usr/local/Proforest4.3/buildout-cache/eggs/zc.buildout-2.2.5-py2.7.egg/zc/buildout/buildout.py", line 1370, in _call
return f()
File "/data/usr/local/Proforest4.3/buildout-cache/eggs/plone.recipe.precompiler-0.6-py2.7.egg/plone/recipe/precompiler/__init__.py", line 29, in install
return self._run()
File "/data/usr/local/Proforest4.3/buildout-cache/eggs/plone.recipe.precompiler-0.6-py2.7.egg/plone/recipe/precompiler/__init__.py", line 35, in _run
self._compile_eggs()
File "/data/usr/local/Proforest4.3/buildout-cache/eggs/plone.recipe.precompiler-0.6-py2.7.egg/plone/recipe/precompiler/__init__.py", line 67, in _compile_eggs
py_compile.compile(fn, None, None, True)
File "/usr/lib64/python2.7/py_compile.py", line 123, in compile
with open(cfile, 'wb') as fc:
IOError: [Errno 13] Permission denied: '/data/usr/local/Proforest4.3/test/src/proforest.content/proforest/content/behaviours/accordion.pyc'
accordion.py does exist, but not the .pyc version
Permissions on accordion.py seem correct (owned by plone_buildout etc.)
How do I resolve?
You user is trying to create that file, but filesystem permissions are wrong.
Check that the Plone effective-user is able to write in buildout folders.

Resources