• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

435
Views
ImportError: no se puede importar el nombre 'docevents' de 'botocore.docs.bcdoc' en AWS CodeBuild

ImportError: no se puede importar el nombre 'docevents' de 'botocore.docs.bcdoc'
( /python3.7/site-packages/botocore/docs/bcdoc/init.py )

 Traceback (most recent call last): File "/root/.pyenv/versions/3.7.6/bin/aws", line 19, in <module> import awscli.clidriver File "/root/.pyenv/versions/3.7.6/lib/python3.7/site-packages/awscli/clidriver.py", line 36, in <module> from awscli.help import ProviderHelpCommand File "/root/.pyenv/versions/3.7.6/lib/python3.7/site-packages/awscli/help.py", line 23, in <module> from botocore.docs.bcdoc import docevents ImportError: cannot import name 'docevents' from 'botocore.docs.bcdoc' (/root/.pyenv/versions/3.7.6/lib/python3.7/site-packages/botocore/docs/bcdoc/__init__.py) [Container] 2020/10/29 16:48:39 Command did not exit successfully aws --version exit status 1

La falla ocurre en PRE_BUILD .

Y este es mi archivo de compilación de especificaciones: buildspec-cd.yml

 pre_build: commands: - AWS_REGION=${AWS_DEFAULT_REGION} - COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) - IMAGE_VERSION=${COMMIT_HASH} - REPOSITORY_URI=${CONTAINER_REGISTRY}/${APPLICATION_NAME} - aws --version - echo Logging in to Amazon ECR... - $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)

La compilación de código funcionaba correctamente y no se ha cambiado nada. Solo dejo de funcionar.

about 3 years ago · Santiago Trujillo
6 answers
Answer question

0

Leyendo este número de GitHub #2596. arreglé mi error.

Justo antes de la sección PRE_BUILD, agregué esta línea a mi archivo buildspec-cd.yml:

pip3 instalar --actualizar awscli

 install: commands: - pip3 install awsebcli --upgrade - eb --version - pip3 install --upgrade awscli pre_build: commands: - AWS_REGION=${AWS_DEFAULT_REGION} - COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) - IMAGE_VERSION=${COMMIT_HASH} ...
about 3 years ago · Santiago Trujillo Report

0

Para mí es un problema de versión. Entonces, lo arreglé con las siguientes versiones:

  1. aws-cli/1.18.105

Comando: sudo python3 -m pip3 install awscli==1.18.105

  1. botocore/1.17.28

Comando: sudo python3 -m pip3 install botocore==1.17.28

about 3 years ago · Santiago Trujillo Report

0

Estaba recibiendo el mismo error en Ubuntu 20.04, la respuesta de @vijay rajput no funcionó al principio, se solucionó reemplazando pip3 con pip - sudo python3 -m pip install awscli==1.18.105 y sudo python3 -m pip install botocore==1.17.28 gracias

about 3 years ago · Santiago Trujillo Report

0

En mi caso, este error ocurre al ejecutar el comando 'aws --version' en ubuntu 20.04.

Y la solución fue:

python3 -m pip instalar –-actualizar pip
python3 -m pip desinstalar awscli
python3 -m pip instalar awscli
about 3 years ago · Santiago Trujillo Report

0

También recibí este error en Ubuntu 20.04 (aunque no en CodeBuild, estaba ejecutando aws lambda invoke ). La instalación de AWS CLI v2 ( https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html ) funcionó para mí:

 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install
about 3 years ago · Santiago Trujillo Report

0

pip desinstalar botocore funcionó para mí

about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error