I'm working on a fastlane lane using pink-room's fastlane firebase test lab plugin which needs a gcloud service account to connect to firebase and upload files to a bucket.
The service account is needed because the script runs in a docker container which must not be worked by humans.
Gcloud command seem to work, because the test are launched as intended, but the gsutil command which is use to upload raw results is failing.
When this service account is loaded, gsutil commands stop working because they throw a ConfigParser.ParsingError "File contains parsing errors".
Here is what I get when trying to execute gsutil version -l in order to gather more informations:
Exit status of command 'gsutil version -l' was 1 instead of 0.
Traceback (most recent call last):
File "/usr/local/gcloud/google-cloud-sdk/platform/gsutil/gsutil", line 22, in <module>
gsutil.RunMain()
File "/usr/local/gcloud/google-cloud-sdk/platform/gsutil/gsutil.py", line 116, in RunMain
import gslib.__main__
File "/usr/local/gcloud/google-cloud-sdk/platform/gsutil/gslib/__main__.py", line 39, in <module>
import boto
File "/usr/local/gcloud/google-cloud-sdk/platform/gsutil/third_party/boto/boto/__init__.py", line 53, in <module>
config = Config()
File "/usr/local/gcloud/google-cloud-sdk/platform/gsutil/third_party/boto/boto/pyami/config.py", line 63, in __init__
self.read(BotoConfigLocations)
File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
self._read(fp, filename)
File "/usr/lib/python2.7/ConfigParser.py", line 546, in _read
raise e
ConfigParser.ParsingError: File contains parsing errors: /builds/project-0/gcloud
/legacy_credentials/<service account mail>/.boto
[line 3]: '/legacy_credentials/<service account mail>/adc.json'
Here is my .boto file :
[Credentials]
gs_service_key_file = /builds/project-0/gcloud/legacy_credentials/<service account mail>/adc.json
Do someone knows where this error comes from, and how I can fix it ?
You say your boto file only has 2 lines, but I don't think that's the case, based on your error message :) I'm guessing either there's whitespace in there that you're not seeing (some unicode character that might not render correctly in your editor, perhaps?), or you didn't copy/paste the contents exactly as they appear in your file.
After finding a similar issue in this blog post, I noticed that the error you're seeing will print out the entire content of each problematic line that it found. It says it's printing line 3 (that shouldn't be possible if the boto file has only 2 lines), but doesn't show the gs_service_key_file = text. I'm guessing there's some sort of line break between gs_service_key_file = and /build/project-0/... in your boto file.
Related
yaml" file and ".bat" file present in github repository ? I am not able to build a model in anaconda using 'conda build' Can anyone please guide??
(dl) C:\Users\Nishant>conda build .
Traceback (most recent call last):
File "E:\anaconda\envs\dl\Scripts\conda-build-script.py", line 10, in
sys.exit(main())
File "E:\anaconda\envs\dl\lib\site-packages\conda_build\cli\main_build.py", line 469, in main
execute(sys.argv[1:])
File "E:\anaconda\envs\dl\lib\site-packages\conda_build\cli\main_build.py", line 460, in execute
verify=args.verify, variants=args.variants)
File "E:\anaconda\envs\dl\lib\site-packages\conda_build\api.py", line 207, in build
raise ValueError('No valid recipes found for input: {}'.format(recipe_paths_or_metadata))
ValueError: No valid recipes found for input: ['.']
From the log, it doesn't mention xxx.yaml or xx.bat file. Probably you are entering wrong input.
.yml file is configuration file called YAML. While .bat is a kind of Windows execute script. You should read carefully about readme on github repository.
I am getting an error while running the following command. I have updated gcloud SDK but still facing same error.
kubectl get nodes
Unable to connect to the server: error executing access token command "/Users/salayhin/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=exit status 1 output= stderr=Traceback (most recent call last):
File "/Users/salayhin/google-cloud-sdk/lib/gcloud.py", line 95, in <module>
main()
File "/Users/salayhin/google-cloud-sdk/lib/gcloud.py", line 54, in main
from googlecloudsdk.core.util import encoding
File "/Users/salayhin/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
from googlecloudsdk.core.util import lazy_regex
File "/Users/salayhin/google-cloud-sdk/lib/googlecloudsdk/core/util/lazy_regex.py", line 25, in <module>
from googlecloudsdk.core.util import lazy_regex_patterns
ImportError: cannot import name lazy_regex_patterns
It seems like it's just an error from the Google Cloud SDK happening here indicating that you are probably missing this file on the same directory.
I would recommend re-install the Google Cloud SDK on whatever system you are using.
So I'm just trying to get the suggested query (domain = whois.query("google.com")) working. But whenever I run it, I get the following traceback:
File "file.py", line x, in weight_sources
domain = whois.query("google.com")
File "C:\Users\User Name\Anaconda3\lib\site-packages\whois\__init__.py", line 50, in query
pd = do_parse(do_query(d, force, cache_file, slow_down, ignore_returncode), tld)
File "C:\Users\User Name\Anaconda3\lib\site-packages\whois\_1_query.py", line 44, in do_query
_do_whois_query(dl, ignore_returncode),
File "C:\Users\User Name\Anaconda3\lib\site-packages\whois\_1_query.py", line 58, in _do_whois_query
p = subprocess.Popen(['whois', '.'.join(dl)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
File "C:\Users\User Name\Anaconda3\lib\subprocess.py", line 856, in __init__
restore_signals, start_new_session)
File "C:\Users\User Name\Anaconda3\lib\subprocess.py", line 1111, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I've seen some other questions/answers point to line 1111 in subprocess, but I think the issue might be in whois as I have used subprocess extensively without error on my device. Since the non-existent file seems to be related to the whois package, I don't think this question is related to this one, although the two could be related?
Essentially, is there any work around for this error or if I need to edit the whois package code, how would I go about that? I'm not exactly sure I even fully understand what "file" is missing...
The missing file is the whois executable, which is opened here:
subprocess.Popen(['whois', '.'.join(dl)]
The package description says whois is a wrapper for the Linux whois command. That means you must be running on Linux and have whois installed, but you are running Windows.
So I think you're out of luck with this package, maybe another one (such as python-whois) supports Windows.
I use environment variables in Supervisord's program section, and they work just fine:
[program:some_prog]
command=%(ENV_env_var_name)s/...
I can't figure out though how to do the same in the [supervisord] section.
I tried using the same syntax with and without the ENV_ prefix, but getting the following error:
Traceback (most recent call last):
File "/usr/local/bin/supervisord", line 9, in <module>
load_entry_point('supervisor==3.0a12', 'console_scripts', 'supervisord')()
File "/usr/local/lib/python2.7/dist-packages/supervisor-3.0a12-py2.7.egg/supervisor/supervisord.py", line 356, in main
options.realize(args, doc=__doc__)
File "/usr/local/lib/python2.7/dist-packages/supervisor-3.0a12-py2.7.egg/supervisor/options.py", line 419, in realize
Options.realize(self, *arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/supervisor-3.0a12-py2.7.egg/supervisor/options.py", line 284, in realize
self.process_config_file()
File "/usr/local/lib/python2.7/dist-packages/supervisor-3.0a12-py2.7.egg/supervisor/options.py", line 478, in process_config_file
Options.process_config_file(self, do_usage=do_usage)
File "/usr/local/lib/python2.7/dist-packages/supervisor-3.0a12-py2.7.egg/supervisor/options.py", line 292, in process_config_file
self.read_config(self.configfile)
File "/usr/local/lib/python2.7/dist-packages/supervisor-3.0a12-py2.7.egg/supervisor/options.py", line 527, in read_config
section.directory = existing_directory(directory)
File "/usr/local/lib/python2.7/dist-packages/supervisor-3.0a12-py2.7.egg/supervisor/datatypes.py", line 336, in existing_directory
nv = v % {'here':here}
KeyError: 'var_name'
Is there a way to achieve that?
Supervisor only supports expansions with environment variables in a limited number of locations, each of which is documented in the configuration documentation.
Unfortunately, the [supervisord] directory option is not one of those; it only supports the %(here) variable, nothing else.
You could file a feature request for this in the supervisord issue tracker if this an important issue for you.
In my projects, we generally use zc.buildout to make deployment and development environment setup predictable and repeatable, and generate the supervisor configuration from a template. There is a specialized buildout recipe to make this task easier.
I'm trying to run doxyclean but can't get it to work, any help would be appreciated...
I'm running from terminal :
./doxyclean.py --input=./xml/ --output=./clean/ --name="MyProject" --phone -v
I have my doxygen xml in the folder xml, in the same directory as doxyclean.py
The result is :
Checking arguments
Cleaning XML files:
Traceback (most recent call last):
File "./doxyclean.py", line 1220, in <module>
sys.exit(main())
File "./doxyclean.py", line 1171, in main
cleanXML(filePath, xmlOutputDirectory)
File "./doxyclean.py", line 93, in cleanXML
if not fileIsDocumented(filePath):
File "./doxyclean.py", line 62, in fileIsDocumented
originaldoc = minidom.parse(filePath)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 17, column 155
thanks
did you try other ways, my suggestions
use different version of doxyclean
change the arguments to different style, maybe give full paths to the folders.
./doxyclean.py -i Users/xxx/doxyclean/xml/ -o ./clean/ -p
regenerate xml from doxygen
doxyclean works fine. I got this error too and I tried my suggestion 2 and it worked.