I tried installing the SnowSQL from the installer as available from the web interface. The installer runs but when I try to run a command in command prompt it gives me the below error.
C:\Users\rahul.sharma>snowsql
Traceback (most recent call last):
File "lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 11, in <module>
File "c:\windows\temp\snowsql\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "lib\site-packages\pkg_resources\__init__.py", line 86, in <module>
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[15764] Failed to execute script pyi_rth_pkgres
I have also tried uninstalling and re-installing, but still, it gives me the same error. Can someone assist with this?
There seems to be an issue with the Snowsql download from within the application (via the Help menu) so the workaround for now is to manually download the previous version directly from the repo:
For AWS Platform Account :
Download the Snowsql 1.2.1 for Linux:
https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.1-linux_x86_64.bash
Download the Snowsql 1.2.1 for MacOS:
https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/darwin_x86_64/snowsql-1.2.1-darwin_x86_64.pkg
Download the Snowsql 1.2.1 for Windows:
https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/windows_x86_64/snowsql-1.2.1-windows_x86_64.msi
For Azure Platform Account:
Download the Snowsql 1.2.1 for Linux:
https://sfc-repo.azure.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.2-linux_x86_64.bash
Download the Snowsql 1.2.1 for MacOS:
https://sfc-repo.azure.snowflakecomputing.com/snowsql/bootstrap/1.2/darwin_x86_64/snowsql-1.2.1-darwin_x86_64.pkg
Download the Snowsql 1.2.1 for Windows:
https://sfc-repo.azure.snowflakecomputing.com/snowsql/bootstrap/1.2/windows_x86_64/snowsql-1.2.1-windows_x86_64.msi
Related
I'm using Ionic 4, Cordova 9, Nodejs 10.16, npm 6.9 and I would like to run the app on my device.
I just reinstalled Android Studio to the latest version and I got an error when using the run command:
Command
ionic cordova run android --device
Error (DEVICEID - My Device ID)
Error: Command failed: P:\Simplifiedpath\platform-tools/adb -s DEVICEID shell getprop
When using --verbose, I get those details:
ionic:lib:shell Error in subprocess stdout pipe: Error [ERR_STREAM_WRITE_AFTER_END]: write after end at writeAfterEnd (_stream_writable.js:248:12) at Object.Writable.write (_stream_writable.js:296:5) at Readable.write (C:\Simplifiedpath\npm\node_modules\ionic\node_modules\stream-combiner2\node_modules\readable-stream\lib\_stream_readable.js:85
What's the point about this error ?
after update sdk/platform-tools to version 29, i have the same error, to resolve:
Open Android Studio, and go to File>Settings>Android SDK on tab "SDK Tools" and uncheck
"Android SDK Platform-Tools 29" and click "Apply" to uninstall platform-tools
Then. download platform-tools 28 from this link
https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip
uncompress "platform-tools" under sdk directory, for example: "C:\Users\User\AppData\Local\Android\sdk"
to check if good, see File>Settings>Android SDK on tab "SDK Tools", now look like the image
Setup: Run in Google Cloud Shell Standard Env
I tried to access firestore from the flask app using from google.cloud import firestore
I have installed it using pip install --upgrade google-cloud-firestore -t lib. If I run the script manually, it works fine. But when using dev_appserver.py, it fails. Got the error below.
$ dev_appserver.py app.yaml
INFO 2017-10-06 07:34:35,301 devappserver2.py:105] Skipping SDK update check.
INFO 2017-10-06 07:34:35,391 api_server.py:300] Starting API server at: http://0.0.0.0:34796
WARNING 2017-10-06 07:34:35,391 dispatcher.py:312] Your python27 micro version is below 2.7.12, our current production version.
INFO 2017-10-06 07:34:35,440 dispatcher.py:251] Starting module "default" running at: http://0.0.0.0:8080
INFO 2017-10-06 07:34:35,441 admin_server.py:116] Starting admin server at: http://0.0.0.0:8000
ERROR 2017-10-06 07:34:42,266 wsgi.py:263]
Traceback (most recent call last):
File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/home/user1/projects/probfe/main.py", line 10, in <module>
from google.cloud import firestore
File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1132, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named google.gax
However, in my lib, I can see them.
$ls lib
builtins future-0.16.0.dist-info itsdangerous.pyc requests-2.18.4.dist-info
cachetools futures-3.1.1.dist-info jinja2 rsa
cachetools-2.0.1.dist-info google Jinja2-2.9.6.dist-info rsa-3.4.2.dist-info
certifi googleapis_common_protos-1.5.3.dist-info libfuturize setuptools
certifi-2017.7.27.1.dist-info googleapis_common_protos-1.5.3-py2.7-nspkg.pth libpasteurize setuptools-36.5.0.dist-info
chardet google_auth-1.1.1.dist-info _markupbase six-1.11.0.dist-info
chardet-3.0.4.dist-info google_auth-1.1.1-py2.7-nspkg.pth markupsafe six.py
click google_cloud_core-0.27.1.dist-info MarkupSafe-1.0.dist-info six.pyc
click-6.7.dist-info google_cloud_core-0.27.1-py3.6-nspkg.pth past socketserver
concurrent google_cloud_firestore-0.27.0.dist-info pkg_resources tests
copyreg google_cloud_firestore-0.27.0-py3.6-nspkg.pth ply _thread
dill google_gax-0.15.15.dist-info ply-3.8.dist-info tkinter
dill-0.2.7.1.dist-info google_gax-0.15.15-py2.7-nspkg.pth protobuf-3.4.0.dist-info urllib3
_dummy_thread grpc protobuf-3.4.0-py2.7-nspkg.pth urllib3-1.22.dist-info
easy_install.py grpcio-1.4.0.dist-info pyasn1 werkzeug
easy_install.pyc html pyasn1-0.3.7.dist-info Werkzeug-0.12.2.dist-info
enum http pyasn1_modules winreg
enum34-1.1.6.dist-info idna pyasn1_modules-0.1.4.dist-info xmlrpc
flask idna-2.6.dist-info queue
Flask-0.12.2.dist-info itsdangerous-0.24.dist-info reprlib
future itsdangerous.py requests
Since you're using dev_appserver.py it means you have a standard env application. And in the standard env all external dependencies need to be installed in your app, not on the local python instalation (which is what you did with your pip invocation).
From Installing a third-party library:
Create a directory to store your third-party libraries, such as lib/.
mkdir lib
Use pip (version 6 or later) with the -t <directory> flag to copy the libraries into the folder you created in the previous
step. For example:
pip install -t lib/ <library_name>
I have a Flask application deployed on an Amazon Elastic Beanstalk cluster. On my local machine, macOS, I've added an integration with the Google Cloud API, and I've updated my requirements.txt to include the line google-cloud==0.27.0. When I deploy to Elastic Beanstalk with the updated requirements file, my deployment fails during pip install with the error
Running setup.py install for grpcio
Complete output from command /opt/python/run/venv/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ve1vz0tx/grpcio/setup
.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-aszzosux-rec
ord/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python3.4/grpcio:
Failed to import the site module
Traceback (most recent call last):
File "/opt/python/run/venv/lib64/python3.4/site.py", line 890, in <module>
main()
File "/opt/python/run/venv/lib64/python3.4/site.py", line 848, in main
virtualenv_search_paths(sys.prefix)
File "/opt/python/run/venv/lib64/python3.4/site.py", line 638, in virtualenv_search_paths
addsitedir(sitedir, known_paths)
File "/opt/python/run/venv/lib64/python3.4/site.py", line 204, in addsitedir
addpackage(sitedir, name, known_paths)
File "/opt/python/run/venv/lib64/python3.4/site.py", line 173, in addpackage
exec(line)
File "<string>", line 1, in <module>
KeyError: 'google'
I am able to install my requirements locally in a virtualenv running python 3, however, when I create a similar virtualenv on my ec2 and install the requirements, I get the same error I get during deployment. One thing I have read about is that the ec2 might not have google cloud sdk installed, however, I installed it on my ec2 (tested both inside and outside of a virtualenv) using the following commands as described here here:
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
gcloud init
How can I diagnose this error and prevent it from happening going forward?
My current hypotheses are:
there is still an issue with the way google cloud sdk is install or operating on the ec2
there is some conflict between requirements in my requirements.txt file once I add the google-cloud requirement
I've identified and fixed the problem. I had google==1.9.2 as a package in my requirements.txt and it wasn't playing well with google-cloud==0.27.0. I'm not sure why this occurred though.
Note: when deploying to Elastic Beanstalk, I had to rebuild the environments for the change to take place. It seems like Elastic Beanstalk reuses the Python virtualenv across deploys, so if a server had ever run a version of my application with google==1.9.2 in requirements, that previously installed version of google would interfere with future deploys that excluded it
I am using libcloud 1.2.1 with pysphere 0.1.7. I am getting the below error when trying to connect to the ESXi host.
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/vsphere.py", line 152, in init
port=port, url=url)
File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 1177, in init
self.connection = self.connectionCls(args, *conn_kwargs)
TypeError: init() got an unexpected keyword argument 'retry_delay'
I am using the below commands to connect to the host.
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
vsphere = get_driver(Provider.VSPHERE)
driver = vsphere(host='',username='username',password='password')
I can do this using pysphere only but not with libcloud. Tried looking on the internet and changing the content of the libraries but in vain. Can anyone help ?
This is a bug in v1.5.0<, there is a committed fix. You can apply the patch manually using git am: https://patch-diff.githubusercontent.com/raw/apache/libcloud/pull/967.patch
Wait for v1.6.0, or install directly from GitHub trunk
pip install git+https://github.com/apache/libcloud.git#trunk#egg=apache-libcloud
I've been running app engine local development server from the command prompt for 3 years without any issues (windows 7, 64bit). I just updated to v1.9.36 (download 960cfe2157c6e984802db4b0224cfe8273d727dc from this page), and now when I run
dev_appserver.py [anything]
I get:
Traceback (most recent call last): File "C:\Program
Files\Google\Cloud
SDK\google-cloud-sdk\platform/google_appengine\dev_appserver.py", line
82, in
_run_file(file, globals()) File "C:\Program Files\Google\Cloud
SDK\google-cloud-sdk\platform/google_appengine\dev_appserver.py", line
78, in _run_file
execfile(_PATHS.script_file(script_name), globals_) File "C:\Program Files
(x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py",
line 37, in
from google.appengine.tools.devappserver2 import dispatcher File "C:\Program Files
(x86)\Google\google_appengine\google\appengine\tools\devappserver2\dispatcher.py",
line 29, in
from google.appengine.tools.devappserver2 import module File "C:\Program Files
(x86)\Google\google_appengine\google\appengine\tools\devappserver2\module.py",
line 55, in
from google.appengine.tools.devappserver2 import http_runtime File "C:\Program Files
(x86)\Google\google_appengine\google\appengine\tools\devappserver2\http_runtime.py",
line 53, in
import portpicker ImportError: No module named portpicker
The strange thing is that if I use the SDK GUI, and hit the 'Run' button, it launches just fine, no errors. So my guess is that when running from the command line, it's using the version of 'dev_appserver.py' in the Cloud SDK folder, whereas the GUI is running the version in C:\Program Files (x86)\Google\google_appengine\. But my environment variables are:
GAE_SDK_ROOT: C:\Program Files (x86)\Google\google_appengine
PATH: lots of other things, plus C:\Program Files (x86)\Google\google_appengine\
And I dont see any reference to Cloud SDK, so I cant figure why the version in the folder would be run.
There are versions of dev_appserver.py in both C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine and C:\Program Files (x86)\Google\google_appengine
Seems that in combining GAE SDK with Google Cloud, Google has made this more complicated than it used to be..
[UPDATE]
If I run echo %PATH% then among many other things, I see
C:\Program Files\Google\Cloud SDK\google-cloud-sdk..
before
C:\Program Files (x86)\Google\google_appengine\
Which explains why it's running that version. The question now is: why is the former in my PATH if I havent set it in my user PATH variable? Where else is the Windows PATH manipulated? Presumable the Google Cloud SDK installer did this - how do I undo it?
Executing dev_appserver.py [anything] will launch the first dev_appserver.py executable encountered in your executable PATH environment, which appears to be not the one you expect :)
You have 2 options:
update your PATH as needed
execute the desired dev_appserver.py by specifying its full path:
C:\Program Files (x86)\Google\google_appengine\dev_appserver.py [anything]
This answer is somehow related: appcfg.py not working in command line
New answer
I turns out that the Cloud SDK folder was in my system path, which is checked before the user path, so the version of dev_appserver.py in Cloud SDK was being executed, rather than the more up to date version in the app engine folder.
To fix this I simply removed the Cloud SDK from my system path, using the handy app detailed here
Original answer
I worked out that if I rename the Cloud SDK folder in C:\Program Files\Google this fixes it. But that's a hacky fix, and presumably makes the Cloud SDK functionality unavailable (I dont think I currently need it).
So I'd still like a proper answer to this question. It seems that I need a way to control which version of dev_appserver.py gets run, and short of setting my environment variables (which I've already done) I dont know what else to try.
As an alternative to the other answers, if you do not have the old standalone Google App Engine installed and only uses the Google SDK, you can also install portpicker with the following command line (assuming you have pip installed):
pip install portpicker