- This topic has 2 replies, 2 voices, and was last updated 4 years, 6 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › Fórum Inteligência Artificial: Buscas em Textos com Python › AtributeError na urllib3
Olá!
Estou tendo problemas com a execução da importação da biblioteca urllib3. retorna o seguinte erro:
AttributeError: partially initialized module ‘urllib3’ has no attribute ‘PoolManager’ (most likely due to a circular import)
Código igual ao da aula:
import urllib3
http = urllib3.PoolManager()
 pagina = http.request(‘GET’, ‘https://datapraxes.com’)
 pagina.status
Tanto no Pycharm quanto no Spyder, ambos com interpretador do conda3 na versão do python 3.8
Já desinstalei e reinstalei. Sempre com esse erro
Alguma luz?
Grato!
Danilo Lima
Resolvido!
O problema estava ocorrendo pelo fato do meu arquivo python estar com o nome urllib3.py e não como o exemplo da aula.
Por esse motivo estava dando o conflito, pois estando com o mesmo nome da lib o interpretador não estava sabendo qual considerar.
Vivendo e aprendendo.
Grato!
Olá Danilo, que bom deu certo, obrigado por compartilhar a solução.
Fabio