Android Test Station give error and does not run - python

After running "mtt start" i get this error message, what could be the cause of this and how can it be resolved?
/home/me/.local/lib/python3.6/site-packages/google/auth/crypt/_cryptography_rsa.py:22: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
import cryptography.exceptions
INFO|No lab config path set; using standalone mode config
INFO|Using image gcr.io/android-mtt/mtt:prod.
WARNING|No gcloud or service account json key file, can not login to https://gcr.io.
Traceback (most recent call last):
File "/home/me/.local/bin/mtt", line 11, in <module>
load_entry_point('Android-Test-Station-CLI===R30.202206.000', 'console_scripts', 'mtt')()
File "/home/me/.local/lib/python3.6/site-packages/multitest_transport/cli/cli.py", line 1204, in Main
args.func(args)
File "/home/me/.local/lib/python3.6/site-packages/multitest_transport/cli/cli.py", line 367, in Start
_StartMttNode(args, host)
File "/home/me/.local/lib/python3.6/site-packages/multitest_transport/cli/cli.py", line 399, in _StartMttNode
if docker_helper.IsContainerRunning(args.name):
File "/home/me/.local/lib/python3.6/site-packages/multitest_transport/cli/command_util.py", line 974, in IsContainerRunning
container_name, res.stderr, res.stdout))
multitest_transport.cli.command_util.DockerError: Failed to inpect mtt:
stderr:Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/mtt/json": dial unix /var/run/docker.sock: connect: permission denied
stdout:
.

Related

IOError: [Errno 0] Error while writing to output of Powershell in VSCode

This is the error I get in VSCode when running docker-compose.
PS D:\Work\Imho\Api> docker-compose -f docker-compose.yml up
Creating network "api_default" with the default driver
Pulling ignite (apacheignite/ignite:latest)...
latest: Pulling from apacheignite/ignite
5040bd298390: Pulling fs layer
fce5728aad85: Pulling fs layer
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose\cli\main.py", line 68, in main
File "compose\cli\main.py", line 118, in perform_command
File "compose\cli\main.py", line 926, in up
File "compose\project.py", line 401, in up
File "compose\service.py", line 305, in ensure_image_exists
File "compose\service.py", line 1001, in pull
File "compose\progress_stream.py", line 37, in stream_output
File "codecs.py", line 370, in write
File "site-packages\colorama\ansitowin32.py", line 40, in write
File "site-packages\colorama\ansitowin32.py", line 141, in write
File "site-packages\colorama\ansitowin32.py", line 169, in write_and_convert
File "site-packages\colorama\ansitowin32.py", line 174, in write_plain_text
IOError: [Errno 0] Error
Failed to execute script docker-compose
docker-compose.yml:
version: '3'
services:
ignite:
image: apacheignite/ignite
This error only happens on one of my 3 machines, so I have no idea what causes it. Resetting to factory defaults or reinstalling docker and vscode doesn't help. Without docker compose the image is pulling and then working fine. All the machines are on windows 10 and latest stable docker installed.
Here is the issue I opened on github. It appeared that this behavior only occurs in VSCode powershell console, but not in regular powershell console. The solution with changing encoding suggested there didn't help.
Solution: Update to 1803 on Windows 10. If you can't update, use external command prompt.
The same thing happens to me with Python scripts. Apparently, this is a Windows Update issue:
https://github.com/Microsoft/vscode/issues/36630#issuecomment-359969098
Edit: My workaround due to my company restricting updates is to use external terminal in VS Code

wfastcgi fails import cx_Oracle, but `python -c "import cx_Oracle" succeeds

I have IIS setup with fastCGI, serving a flask app. So far so good. Next I whish to add some database connectivity, so I add the line import cx_Oracle to my app. Now this error is thrown:
Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 791, in main
env, handler = read_wsgi_handler(response.physical_path)
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler
handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 616, in get_wsgi_handler
raise ValueError('"%s" could not be imported%s' % (handler_name, last_tb))
ValueError: "Bloomberg_server.app" could not be imported:
Traceback (most recent call last):
File "D:\Anaconda2\lib\site-packages\wfastcgi.py", line 600, in get_wsgi_handler
handler = __import__(module_name, fromlist=[name_list[0][0]])
File "D:\website\init__.py", line 6, in import cx_Oracle
ImportError: DLL load failed: The specified module could not be found. StdOut: StdErr:
As the title suggests I fail to reproduce the issue in a controlled environment. The very same import statement works fine in the conda environment and moreover, I can run the Flask debug server just fine with pages that rely on a database connection.
I am at loss. Who has a clue what's going on here? The path/oracle_home variables are pointing to the instant client and I have only one python environment installed.
I am too embarrased to admit how long this has taken me, but I've found the answer.
FastCGI's core business is keeping subprocesses alive so that subsequent calls to the server do not require booting a Python environment. In other words, after installing a python package it is advised to reboot. I solved my first question on SO by rebooting..
The answer to this question got me thinking in the right direction.

Upload to Swift Pseudo folders using duplicity

I'm trying to use duplicity to backup files to a Swift Object Storage service offered by RunAbove. The name of the container is "backup" and it has a pseudo folder named "web" inside which I want to place backups.
Duplicity version: 0.6.24
Python version: 2.7.3
python-keystoneclient 1.0.0
python-swiftclient 2.3.1
After setting the necessary environment variables I have tried the following commands:
duplicity --no-encryption /var/www swift://backup/web/
Returns the following error:
Listing of 'backup/web/' failed (attempt 1): JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Then I tried:
duplicity --no-encryption --file-prefix web/ /var/www swift://backup
Which returns python errors:
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
Traceback (most recent call last):
File "/usr/bin/duplicity", line 1509, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1503, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1352, in main
do_backup(action)
File "/usr/bin/duplicity", line 1478, in do_backup
full_backup(col_stats)
File "/usr/bin/duplicity", line 545, in full_backup
globals.backend)
File "/usr/bin/duplicity", line 420, in write_multivol
sig_outfp.to_partial()
File "/usr/lib/python2.7/dist-packages/duplicity/dup_temp.py", line 168, in to_partial
self.tdp.rename(self.dirpath.append(self.partname))
File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 612, in rename
os.rename(self.name, new_path.name)
OSError: [Errno 2] No such file or directory
How do I backup files to a pseudo folder in OpenStack Swift using duplicity?
This issue is fixed in duplicity v0.7.08 (see http://duplicity.nongnu.org/CHANGELOG)
Merged in lp:~ghoz/duplicity/swift-prefix
adds the abiliy to use path in the swift backend, in order to have multiple
backups to the same container neatly organized.

SSL Handshake Error while connecting to Server via web client

I am using SSL Connection from Web Client (firefox) to connect to the local Server created via the code available in this link MDM server code I have all the required signed Certificates issued by Apple available for running the server, as well as all the depended python modules installed.
I ran my code using the following command on my Windows Machine.
python server.py .
This successfully start running the server at the port 8080.
C:\Users\Administrator\Desktop\MDMServer>python server.py <ip address>
Can't find MyApp.mobileprovision in current directory.
Need both MyApp.ipa and Manifest.plist to enable InstallCustomApp.
Starting Server
https://<ipaddress>:8080/
But whenever a Web Client tries to connect to this Server.
Upon launching the link https://<ip address>:8080 in the firefox. The Server reports the following error.
Traceback (most recent call last):
File "server.py", line 498, in <module>
app.run()
File "C:\Python27\lib\site-packages\web\application.py", line 313, in run
return wsgi.runwsgi(self.wsgifunc(*middleware))
File "C:\Python27\lib\site-packages\web\wsgi.py", line 54, in runwsgi
return httpserver.runsimple(func, validip(listget(sys.argv, 1, '')))
File "C:\Python27\lib\site-packages\web\httpserver.py", line 157, in runsimple
server.start()
File "C:\Python27\lib\site-packages\web\wsgiserver\__init__.py", line 1765, in
start
self.tick()
File "C:\Python27\lib\site-packages\web\wsgiserver\__init__.py", line 1815, in
tick
s, ssl_env = self.ssl_adapter.wrap(s)
File "C:\Python27\lib\site-packages\web\wsgiserver\ssl_builtin.py", line 42, i
n wrap
keyfile=self.private_key, ssl_version=ssl.PROTOCOL_SSLv23)
File "C:\Python27\lib\ssl.py", line 372, in wrap_socket
ciphers=ciphers)
File "C:\Python27\lib\ssl.py", line 134, in __init__
self.do_handshake()
File "C:\Python27\lib\ssl.py", line 296, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [Errno 1] _ssl.c:503: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_
HELLO:no shared cipher
Can anyone help me understand:
1) What these errors mean
2) Why I'm getting them, It was not coming with the older version of server.py code applicable to iphone 4s?
3) How I can go about fixing these
Thanks,
Vivek
This is because APNSWrapper hasn't been updated to TLSv1 yet.
Apple no longer supports sslv3 for MDM due to the POODLE vulnerability.
You can update APNSWrapper source yourself though pretty easily.
download the source and update connection.py
ssl_version = self.ssl_module.PROTOCOL_TLSv1,
the run
python setup.py install

Google App Engine - Deploy fails with Exception: Version not ready - Any Ideas?

This issue occurs when deploying either by the Google App Engine Launcher and via the command-line using appcfg.py
I have tried:
- Changing version - (doesn't work)
- Deleting version from when the issue stated (24 hours ago- around the time there was some Python issues on Google) - Doesn't work
- Install one of my other applications (works)
I have been banging my head against the wall on this for 24 hours and can't get any updates onto production
-------- Output -------------------------
Scanning files on local disk.
Cloning 10 static files.
Cloning 98 application files.
Compilation starting.
Compilation completed.
Starting deployment.
Checking if deployment succeeded.
Will check again in 1 seconds.
............
Will check again in 60 seconds.
Checking if deployment succeeded.
Will check again in 60 seconds.
Checking if deployment succeeded.
Will check again in 60 seconds.
Checking if deployment succeeded.
2012-02-24 07:38:36,362 WARNING appcfg.py:1948 Version still not ready to serve, aborting.
2012-02-24 07:38:36,363 ERROR appcfg.py:2178 An unexpected error occurred. Aborting.
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2164, in DoUpload
app_summary = self.Commit()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1949, in Commit
raise Exception('Version not ready.')
Exception: Version not ready.
Rolling back the update.
Password for XXXXX#XXXXXX: Traceback (most recent call last):
File "google_appengine/appcfg.py", line 101, in <module>
run_file(__file__, globals())
File "google_appengine/appcfg.py", line 97, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 3935, in <module>
main(sys.argv)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 3926, in main
result = AppCfgApp(argv).Run()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2497, in Run
self.action(self)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 3692, in __call__
return method()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2915, in Update
self.UpdateVersion(rpcserver, self.basepath, appyaml)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2904, in UpdateVersion
self.options.max_size)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2164, in DoUpload
app_summary = self.Commit()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1949, in Commit
raise Exception('Version not ready.')
Exception: Version not ready.
If deploy fails you might need to 'rollback' manually.
The "Make Symlinks..." menu option can help with command-line work.
*** appcfg.py has finished with exit code 1 ***

Categories