Frequently Asked Questions (faq)¶
Homebrew Python¶
If you installed Python via Homebrew on OS X and get this error:
must supply either home or prefix/exec-prefix -- not both
You can find a solution on here
Python package errors¶
Please ensure that you have the latest version of pip
, setuptools
and virtualenv
If you have error like this:
pip._vendor.pkg_resources.DistributionNotFound:
or
pkg_resources.DistributionNotFound: regex==2017.6.07
you should update your pip
and virtualenv
packages
$ pip install -U pip
$ pip install -U virtualenv
Bundling error¶
This error is usually caused by not having installed the fink-bundler
plugin:
(.python) root@:/app# AWS_PROFILE=superuser-dev ENV=qa lambda deploy
ERROR: u'_zipfile'
ERROR: u'_zipfile'
Traceback (most recent call last):
File "/root/.python/bin/lambda", line 11, in <module>
sys.exit(main())
File "/root/.python/local/lib/python2.7/site-packages/fink/lambda_main.py", line 255, in main
dispatch_only=['version', 'clean']))
File "/root/.python/local/lib/python2.7/site-packages/fink/fink_lifecycle.py", line 195, in main
return lifecycle(awsclient, env, tool, command, arguments)
File "/root/.python/local/lib/python2.7/site-packages/fink/fink_lifecycle.py", line 142, in lifecycle
raise(e)
KeyError: u'_zipfile'
You need to add fink-bundler
into requirements_fink.txt and do:
$ pip install -U -r requirements_fink.txt
Missing configuration error¶
After updating fink
to the latest version you get the following error:
Configuration missing for ‘cloud’
This error appears if you used hocon
based configs without having installed the finklabs-config-reader
plugin. You can install it or use conf2json util (only for finklabs users) to transform your hocon
configs into json
one.
Environment variable error¶
If you run any fink
commands (cloud, code, lambda etc) and get the following error:
ERROR: 'ENV' environment variable not set!
Environment variable “ENV” indicated the account/staging area you want to work with. This parameter tells the tools which config file to use. Please be sure that you provide the correct environment variables (ENV=PROD/DEV/etc.)
$ export ENV=DEV
Using hooks in fink¶
We implemented hooks in fink similar to the plugin mechanism.
You can use hooks in fink in the following places:
- use hooks in a
cloudformation.py
template - use hooks in a
fink_<env>.py
config file - use hooks in a
hookfile.py
. Please specify the location of thehookfile
in your config file.
For details on fink_lifecycle and fink_signals please take a look into the fink plugins section of this documentation.