# Urlib.request is not working on .eu domain

**URL:** <https://forum.anaconda.com/t/urlib-request-is-not-working-on-eu-domain/95808>\
**Category:** Technical Topics\
**Created:** [June 11, 2025, 6:16pm UTC](https://forum.anaconda.com/t/urlib-request-is-not-working-on-eu-domain/95808 "2025-06-11T18:16:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek1](https://avatars.discourse-cdn.com/v4/letter/v/0075a9/32.png) [@Vivek1](https://forum.anaconda.com/u/Vivek1)\
**Post date:** [June 11, 2025, 6:16pm UTC](https://forum.anaconda.com/t/urlib-request-is-not-working-on-eu-domain/95808/1 "2025-06-11T18:16:07Z")

</div>

the following code is working on other online python compiler but not in Anaconda cloud

```auto
import re # regx module 
from urllib.request import urlopen

# urllib is not working for .eu domain

# get zipcode
with urlopen( 'https://python-course.eu/data1/post_codes_germany.txt' ) as fh_zipcode:
    cities_zipcode_data = {}
    next(fh_zipcode) # skip header
    regx = r'[\d]+([^\d]+[a-z])\s(\d+)'
    for line in fh_zipcode:
        result = re.search(regx, line.decode('utf-8').strip())
        if result:
            city, zipcode = result.groups()
            if city in cities_zipcode_data:
                cities_zipcode_data[city].add(zipcode)
            else:
                cities_zipcode_data[city] = {zipcode}
        else:
            pass
            #print(result,line.decode('utf-8').strip())
            # there are errors 

```

---

<div class="post-metadata">

**Author:** ![Glenn\_Jones](https://avatars.discourse-cdn.com/v4/letter/g/80bc00/32.png) [@Glenn\_Jones](https://forum.anaconda.com/u/Glenn_Jones)\
**Post date:** [June 13, 2025, 9:43am UTC](https://forum.anaconda.com/t/urlib-request-is-not-working-on-eu-domain/95808/2 "2025-06-13T09:43:36Z")

</div>

For Starter accounts, there is an allowlist for URLs that can be accessed. If the site has a publicly documented API. You’ll find all the instructions for requesting allowlist additions here: [Requesting Allowlist additions | PythonAnywhere Help](https://help.pythonanywhere.com/pages/RequestingAllowlistAdditions).
