Data Version Control with Google Drive Remote: "googleapiclient.errors.UnknownApiNameOrVersion: name: drive version: v2" - google-client

I'm trying to setup DVC with Google Drive storage as shown here. So far, I've been unsuccessful in pushing data to the remote. I tried both with and without the Google App setup.
After running a dvc push -v, the following exception is shown:
File "(...)/anaconda3/lib/python3.8/site-packages/googleapiclient/discovery.py", line 387, in _retrieve_discovery_doc
raise UnknownApiNameOrVersion("name: %s version: %s" % (serviceName, version))
googleapiclient.errors.UnknownApiNameOrVersion: name: drive version: v2
DVC was installed via pip install dvc[gdrive]. The pip freeze of the concerning packages is:
oauth2client==4.1.3
google-api-python-client==2.0.1
dvc==2.0.1
Any help is thoroughly appreciated.

Can you try to install google-api-python-client==1.12.8 and test in that way?
Edit:
It appears to be that, this was a bug in the 2.0.0-2.0.1 of google-api-client and resolved in 2.0.2. So this should also work google-api-python-client>=2.0.2

Related

Library not loaded: #rpath/libtbb.dylib in Prophet / Python

I'm on a Mac X1, Monterey.
I've installed prophet and run into this issue when trying to fit a model.
RuntimeError: Error during optimization: console log output:
dyld[90668]: Library not loaded: #rpath/libtbb.dylib
Referenced from: /Users/{username}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/prophet_model.bin
Reason: tried: '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file)
I know this has to do with the wrong paths being searched. I can find the dylib in
/Users/{user}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/
But, it seems prophet doesn't know to look there. I'm curious how I can update/fix either the rpath variable or find another solution?
I tried to create a symbolic link with sudo ln -s, but don't have permissions on the laptop.
TIA!
I got it to work on Apple Silicon (M1 Max in my case) by installing older versions of both pystan and prophet:
pip install pystan==2.19.1.1
pip install prophet==1.0
The other important piece of the puzzle is that you should use Python 3.8 to get it working.
Installing older versions of the libraries and using Python 3.8 are both talked about in issue #2002 on Github, but there's not really an explanation of the libtbb.dylib error message.

Getting error #No module named 'obspy.clients.arclink' in the code for downloading earthquake data

I am trying to download earthquake data and using Obspy and Obspy DMT for the same. I have setup anaconda to work with VS code on Linux. I have created the base anaconda and a separate environment for ob spy. After running the program for earthquake data download, I am getting the error #No module named 'obspy.clients.arclink'. I am new to computational seismology and python in general. Please excuse for any mistakes.
This is the error showing:
ModuleNotFoundError: No module named 'obspy.clients.arclink'
Thank you
obspyDMT works with an older obspy version, you can downgrade via:
pip install obspy==1.2.2

Use fluent-plugin-grok-parser with splunk-hec image

I am trying to create an image that has grok-parser installed based on the fluentd-hec image.
This is the Dockerfile i'm using:
FROM splunk/fluentd-hec:1.2.4
USER root
RUN gem install fluent-plugin-grok-parser
RUN chown -R fluent:fluent /usr/local/share/gems/gems/fluent-plugin-grok-parser-*
USER fluent
This is the output from that build
Step 1/5 : FROM splunk/fluentd-hec:1.2.4
---> ac49b85acc6a
Step 2/5 : USER root
---> Running in 4ee81880e92a
Removing intermediate container 4ee81880e92a
---> e3748059e604
Step 3/5 : RUN gem install fluent-plugin-grok-parser
---> Running in 2a1debb084ec
Successfully installed bundler-2.2.5
Building native extensions. This could take a while...
Successfully installed msgpack-1.3.3
Building native extensions. This could take a while...
Successfully installed yajl-ruby-1.4.1
Building native extensions. This could take a while...
Successfully installed cool.io-1.7.0
Successfully installed sigdump-0.2.4
Successfully installed serverengine-2.2.2
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.6.0
Successfully installed concurrent-ruby-1.1.7
Successfully installed tzinfo-2.0.4
Successfully installed tzinfo-data-1.2020.6
Building native extensions. This could take a while...
Successfully installed strptime-0.2.5
Successfully installed fluentd-1.12.0
Successfully installed fluent-plugin-grok-parser-2.6.2
13 gems installed
Removing intermediate container 2a1debb084ec
---> c5155932810c
Step 4/5 : RUN chown -R fluent:fluent /usr/local/share/gems/gems/fluent-plugin-grok-parser-*
---> Running in 1c2550dcac74
Removing intermediate container 1c2550dcac74
---> 7e216a676427
Step 5/5 : USER fluent
---> Running in 5ee31ea2e78a
Removing intermediate container 5ee31ea2e78a
---> ea8bdee73ee5
Successfully built ea8bdee73ee5
the snippet of the configmap is:
#id snow
#type tail
#label #SPLUNK
tag tail.snow.*
path /opt/snow/data/*.log
pos_file /var/log/splunk-snow.log.pos
path_key source
<parse>
#type grok
grok_failure_key grokfailure
<grok>
pattern %{TIMESTAMP_ISO8601:time};%{SPACE}%{GREEDYDATA:log}
</grok>
</parse>
</source>
when I deploy a daemonset using the new image I get the error
config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="Unknown parser plugin 'grok'. Run 'gem search -rd fluent-plugin' to find plugins"
I have tried this in EKS v1.18 as well as docker desktop and they both have the same issue.
Is there anything else I need to add to the dockerfile so that I use extra plugins?
I'd appreciate any help at on this!
I have rewritten the config so grok isn't used so this question isn't needed any more

Missing package to enable rendering OpenAI Gym in Colab

I'm attempting to render OpenAI Gym environments in Colab via a Mac using the StarAI code referenced in previous questions on this topic. However, it fails. The key error (at least the first error) is shown in full below, but the import part seems to be "Please install xdpyinfo!"
PyPI doesn't have xdpyinfo. What is it and how do I install it?
Full error message:
482780428160 abstractdisplay.py:151] xdpyinfo was not found, X start can not be checked! Please install xdpyinfo!
I've seen the same error, and solved it by installing x11-utils package which includes xdpyinfo command.
!apt-get install x11-utils

repose.who-friendlyform dependency in TurboGears 2

I am trying to install TurboGear 2. I was following the steps given in this documentation. Link: http://toscawidgets.org/documentation/tw2.core/turbogears.html
On executing this command
pip install -e .
i got this error
No distributions at all found for repose.who-friendlyform>=1.0.4 (from example==0.1dev)
Then with this command
python setup.py develop
i got this error
Searching for repose.who-friendlyform>=1.0.4
Reading https://pypi.python.org/simple/repose.who-friendlyform/
Couldn't find index page for 'repose.who-friendlyform' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for repose.who-friendlyform>=1.0.4
error: Could not find suitable distribution for Requirement.parse('repose.who-friendlyform>=1.0.4')
I tried to install it with easy_install but it didn't work. How can i overcome this error?
The documentation you are pointing to is quite outdated, which TurboGears version are you trying to use? Latest TG versions don't depend on repoze.who-friendlyform anymore. Try to delete your virtualenv, recreate it and then install TurboGears with pip install tg.devtools.
You can find latest TG version documentation on http://turbogears.readthedocs.org/en/latest/#installing-turbogears with a tutorial on using ToscaWidgets at http://turbogears.readthedocs.org/en/latest/cookbook/TwForms.html
Also latest ToscaWidgets documentation has been moved at http://tw2core.readthedocs.org/en/latest/
If you want to experiment with TG2 and Forms there are also a bunch of runnables you can play with: http://runnable.com/TurboGears