antonbabenko / modules.tf-lambda

Infrastructure as code generator - from visual diagrams created with Cloudcraft.co to Terraform
https://www.cloudcraft.co/
MIT License
350 stars 56 forks source link

Error occured at runing test_lambda_local.sh #15

Closed rkyymmt closed 4 years ago

rkyymmt commented 4 years ago
> ./test_lambda_local.sh                                                                                                                                                                          Traceback (most recent call last):
  File "/usr/local/bin/python-lambda-local", line 6, in <module>
    from lambda_local import main
  File "/usr/local/lib/python3.7/site-packages/lambda_local/__init__.py", line 12, in <module>
    from .main import run
  File "/usr/local/lib/python3.7/site-packages/lambda_local/main.py", line 25, in <module>
    urllib3.disable_warnings()
AttributeError: module 'botocore.vendored.requests.packages.urllib3' has no attribute 'disable_warnings'
oz19 commented 4 years ago

I have the same error. How did you solve it, please?

oz19 commented 4 years ago

I edited the file (/usr/local/lib/python3.7/site-packages/lambda_local/main.py) to import directly from urllib3 package (instead of from botocore.verdored.requests.packages).

However I understand that this is just a workaround, as it will fail again when I update the package (unless the issue is solved for the next version, of course).

antonbabenko commented 4 years ago

Interesting, I am installing it like normal pip packages on Mac - pip install -r requirements.txt, or just one package from here - https://pypi.org/project/python-lambda-local/

$ python -V
Python 3.7.5

I think you have wrong versions of dependencies, but I am not sure which exactly.

antonbabenko commented 4 years ago

It turned out this issue has been just fixed and merged - https://github.com/HDE/python-lambda-local/pull/55

Let's wait for a few hours/days to get it updated.

antonbabenko commented 4 years ago

python-lambda-local has been updated to 0.1.9 where this issue is fixed.