Anaconda does not allow the creation of a new environment - python

I am just starting out with Anaconda, and trying to create a new environment. However, when I try to do this using the navigator, it giver the following error:
CondaHTTPError: HTTP None None for url <https://conda.anaconda.org/conda
forge/win-64/repodata.json><br>Elapsed: None<br><br>An HTTP error occurred
when trying to retrieve this URL.<br>HTTP errors are often intermittent,
and a simple retry will get you on your way.<br>ConnectionError
(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', port=443):
Max retries exceeded with url: /t/<TOKEN>/conda-forge/win-64/repodata.json
(Caused by NewConnectionError
('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at
0x0000000004C39080>: Failed to establish a new connection: [Errno 11004]
getaddrinfo failed',))",),)<br>
I have been reading a lot online and I think it has something to do with the .condarc file. However, I can't figure out how to solve this issue. Does anyone know how to fix this?
Many thanks in advance :)

Related

Flair English sentiment model download

I'm trying to download the en-sentiment model using the following code:
clf = TextClassifier.load('en-sentiment')
but I'm getting the following SSL error:
SSLError: HTTPSConnectionPool(host='nlp.informatik.hu-berlin.de', port=443): Max retries exceeded with url: /resources/models/sentiment-curated-distilbert/sentiment-en-mix-distillbert_4.pt (Caused by SSLError(SSLError(1, '[SSL] unknown error (_ssl.c:1129)')))
I understand this is an issue with my firewall but I can't seem to get around it. I've tried installing openssl in my virtual env but this isn't working. I understand you can download the model manually but I can't find where to download them from.
Any help would be appreciated.
Max retries exceeded with url says it all. Are you sure you can ping the address: nlp.informatik.hu-berlin.de?
Are you sure you can access the resource with web browser?
https://nlp.informatik.hu-berlin.de/resources/models/sentiment-curated-distilbert/sentiment-en-mix-distillbert_4.pt
Please check if you are behind a proxy or firewall and if the certificate of the page is valid. Once you can access with web browser, you are going to be able to run your code.

Python: request.get for github doesn't work

I am trying to run a GET request for a Github url. Unfortunately, I always get an error message.
I tried it for several different websites and it works, just not for github.
I am trying to do it with Jupyter Notebooks in Python, if that is important.
Here is the Error message:
ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /jana-hoh/gdp/main/DP_LIVE_22102021141534889.csv (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7a1c285d60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
An error message that includes Temporary failure in name resolution indicates that the system's DNS server is unable to convert domain names into their corresponding IP address. Some of the causes are:
Your DNS configuration is correct, but the server is unable to respond to DNS requests at the moment
Firewall rules
No internet connectivity
Most of the times I've encountered this error stemmed from being disconnected to the internet. However, if your internet is working properly, you can try to add another DNS server in /etc/resolv.conf. For example, you can add cloudflare's:
nameserver 1.1.1.1

Complete list of causes of MaxRetryError

I am currently using from requests.packages.urllib3.util.retry import Retry to retry some API calls, but I seem to keep encountering different errors as the cause to ConnectionError / MaxRetryError. As I currently catch then generate custom errors, I'd like to go through a complete list of causes that lead to MaxRetryError. I thought this'd be easy to find, but I can't seem to find it anywhere.
Does anyone have any reference to a complete list of possible causes that can lead to ConnectionError / MaxRetryError? The only reference I seem to be able to find is this. Seems like this is an issue others are facing too.
An example of what this error looks like is this:
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='localhost', port=8080): Max retries exceeded with url: ..... (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000026D26242688>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))"))

Unable to Import File using h2o in Python

I'm trying to import a file using h2o in Python.
h2o.init() is successful, but when I do the following:
df = h2o.import_file(path = "Combined Database - Final.csv")
I get a number of errors that I can't find any help on. Here is the last one that shows up:
H2OConnectionError: Unexpected HTTP error:
HTTPConnectionPool(host='127.0.0.1', port=54321): Max retries exceeded
with url: /3/Jobs/
$03017f00000132d4ffffffff$_a6edaa906ba7a556a417c13149c940db (Caused by
NewConnectionError(': Failed to establish a new connection: [WinError
10048] Only one usage of each socket address (protocol/netw ork
address/port) is normally permitted',))
Above it, there are “OSError”, “NewConnectionError”, “MaxRetryError”.
This is my first time using h2o, and I can't even import my data. Any help would be much appreciated!
please see the user guide: http://docs.h2o.ai/h2o/latest-stable/h2o-docs/starting-h2o.html
please also run the following tests (reposted from here) to debug your issue.
Does running h2o.jar from the commandline work?
And if so, does h2o.init() then connect to it?
What do the logs say?
Disable your firewall, and see if it makes a difference. (Remember to
re-enable it afterwards).
Try a different port number (the default is 54321).
Shutdown h2o (h2o.shutdown()) and try running h2o.init() and see if it works.

ebaysdk-python Connection Error

I have a django project which is currently being hosted on pythonanywhere that uses the Finding api of the open source project ebaysdk-python. Now on my local machine, the site worked perfectly, however, when I execute the api call I get this error message: HTTPConnectionPool(host='svcs.ebay.com', port=80): Max retries exceeded with url: /services/search/FindingService/v1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f6560105150>: Failed to establish a new connection: [Errno 111] Connection refused',)).
Now I have scoured the docs and other related questions, but could not figure out the issue. I have verified that my API keys are correct, and my code to execute the api call is straight from the docs. So that I may be pointed in the correct direction: What is the most likely cause for this error to be raised under these circumstances?
Thank you.

Categories