urllib.error.HTTPError: HTTP Error 403: rate limit exceeded

username: Mona_Jalal
cooked: <p>I am not sure why I get rate limit error.</p>
<pre><code class="lang-auto">(fashcomp) [jalal@goku fashion-compatibility]$ python main.py --test --l2_embed --resume runs/nondisjoint_l2norm/model_best.pth.tar --datadir ../../../data/fashion
/scratch3/venv/fashcomp/lib/python3.8/site-packages/torchvision/transforms/transforms.py:310: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
  warnings.warn("The use of the transforms.Scale transform is deprecated, " +
Traceback (most recent call last):
  File "main.py", line 313, in &lt;module&gt;
    main()    
  File "main.py", line 105, in main
    model = torch.hub.load('pytorch/vision:v1.9.0', 'resnet18', pretrained=True)
  File "/scratch3/venv/fashcomp/lib/python3.8/site-packages/torch/hub.py", line 362, in load
    repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, verbose)
  File "/scratch3/venv/fashcomp/lib/python3.8/site-packages/torch/hub.py", line 162, in _get_cache_or_reload
    _validate_not_a_forked_repo(repo_owner, repo_name, branch)
  File "/scratch3/venv/fashcomp/lib/python3.8/site-packages/torch/hub.py", line 124, in _validate_not_a_forked_repo
    with urlopen(url) as r:
  File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/local/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: rate limit exceeded
</code></pre>
<p>I have:</p>
<pre><code class="lang-auto">$ pip freeze
h5py==3.3.0
joblib==1.0.1
numpy==1.21.2
Pillow==8.3.1
scikit-learn==0.24.2
scipy==1.7.1
sklearn==0.0
threadpoolctl==2.2.0
torch==1.9.0
torchaudio==0.9.0
torchvision==0.10.0
typing-extensions==3.10.0.0
</code></pre>
<p>and I followed this:</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/7/2741c557ac7791bc2277a45b9a53c66bdc88f628.png" data-download-href="https://discuss.pytorch.org/uploads/default/2741c557ac7791bc2277a45b9a53c66bdc88f628" title="Screen Shot 2021-08-23 at 10.50.55 PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/7/2741c557ac7791bc2277a45b9a53c66bdc88f628_2_690x208.png" alt="Screen Shot 2021-08-23 at 10.50.55 PM" data-base62-sha1="5Bhx9I8gX49hkA3vB2NAqDwJgE0" width="690" height="208" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/7/2741c557ac7791bc2277a45b9a53c66bdc88f628_2_690x208.png, https://discuss.pytorch.org/uploads/default/optimized/3X/2/7/2741c557ac7791bc2277a45b9a53c66bdc88f628_2_1035x312.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/2/7/2741c557ac7791bc2277a45b9a53c66bdc88f628_2_1380x416.png 2x" data-dominant-color="E0DFDF"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screen Shot 2021-08-23 at 10.50.55 PM</span><span class="informations">1626×492 64.6 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: RachelGomez161999
cooked: <p>This error message indicates that you have exceeded the rate limit for the API or website that you are accessing with the urllib library. This could happen if you are making too many requests in a short amount of time.</p>
<p>To resolve this issue, you can try the following:</p>
<p>Check the API or website documentation to see what the rate limit is and adjust your request frequency accordingly.</p>
<p>If you are accessing an API, consider using an API key or authentication token to increase your rate limit.</p>
<p>Implement a backoff mechanism in your code that waits for a certain amount of time before making another request. This will prevent your code from making too many requests too quickly.</p>
<p>If the website or API has a paid subscription plan, consider upgrading to increase your rate limit.</p>
<p>If none of the above solutions work, you may need to contact the API or website support team for further assistance.</p>
<p>It’s also worth noting that some websites and APIs may have strict usage policies or terms of service that prohibit scraping or excessive use. Be sure to read and comply with these policies to avoid being blocked or banned from the service.</p>
<p>Regards,<br>
Rachel Gomez</p>