question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'docevents' from 'botocore.docs.bcdoc'

See original GitHub issue

botocore 1.18.0 removed AWS CLI specific doc files. Those were already migrated to the CLI in version 1.18.140.

This is failing codebuild stage.

Please add following awscli upgrade command install_stage_dependencies.sh

pip install --upgrade pip

https://github.com/awslabs/aws-control-tower-customizations/blob/master/source/bin/codebuild_scripts/install_stage_dependencies.sh

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
frumaniacommented, Sep 28, 2020

Adding

- pip install --upgrade --user awscli

just before each “pre_build” block in the buildspec should fix this:

e.g.

...
      - apt-get update && apt-get upgrade -y
      - apt-get install zip wget python-pip libyaml-dev -y
      - pip install --upgrade --user awscli
  pre_build:
...

(This is due to an update on botocore that was released on Sept 17th. In order to be able to import the dependency, customers will need to upgrade the awscli or install the awscli manually until a fix is released)

3reactions
groverlalitcommented, Sep 23, 2020

Hello @SamiMamdouh @ahmei0 We are testing the fix and plan to publish a new version as soon as possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot import name 'docevents' from 'botocore.docs.bcdoc' in ...
For me it's a version issue. So, I fixed it with below versions: aws-cli/1.18.105. Command: sudo python3 -m pip3 install awscli==1.18.
Read more >
cannot import name 'docevents' from 'botocore.docs.bcdoc'
The error importerror: cannot import name 'docevents' from 'botocore.docs.bcdoc' occurs in AWS build because of awscli version incompatibility.
Read more >
Unable to run AWS CLI: "ImportError: cannot import name ...
Unable to run AWS CLI: "ImportError: cannot import name 'docevents' from 'botocore.docs.bcdoc'" · linux · command-line · amazon-web-services.
Read more >
cannot import name 'docevents' from 'botocore.docs.bcdoc ...
(I'm not with Amazon/AWS) As a workaround, until the install_stage_dependencies.sh script is fixed in the main repo, you can make a 1 line ......
Read more >
cannot import name 'docevents' from 'botocore.docs.bcdoc' in ...
Answer a question ImportError: cannot import name 'docevents' from 'botocore.docs.bcdoc' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found