diff --git a/openedx/core/djangoapps/catalog/utils.py b/openedx/core/djangoapps/catalog/utils.py index a802075d92..61e40ce4d0 100644 --- a/openedx/core/djangoapps/catalog/utils.py +++ b/openedx/core/djangoapps/catalog/utils.py @@ -263,8 +263,8 @@ def get_localized_price_text(price, request): # Override default user_currency if location is available if user_location and get_currency_data: currency_data = get_currency_data() - user_country = pycountry.countries.get(alpha2=user_location) - user_currency = currency_data.get(user_country.alpha3, user_currency) + user_country = pycountry.countries.get(alpha_2=user_location) + user_currency = currency_data.get(user_country.alpha_3, user_currency) return format_price( price=(price * user_currency['rate']), diff --git a/requirements/edx/base.in b/requirements/edx/base.in index 17a41376ab..2e767558c7 100644 --- a/requirements/edx/base.in +++ b/requirements/edx/base.in @@ -114,7 +114,7 @@ piexif==1.0.2 # Exif image metadata manipulation, used in Pillow # Image manipulation library; used for course assets, profile images, invoice PDFs, etc. py2neo<4.0.0 # Used to communicate with Neo4j, which is used internally for modulestore inspection PyContracts==1.7.1 -pycountry==1.20 +pycountry pycryptodomex==3.4.7 pygments # Used to support colors in paver command output pygraphviz # No longer in use? Optional dependency of networkx, from edx-sandbox/shared.in diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 62f5c0917e..55bb91ad65 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -187,7 +187,7 @@ polib==1.1.0 # via edx-i18n-tools psutil==1.2.1 py2neo==3.1.2 pycontracts==1.7.1 -pycountry==1.20 +pycountry==18.12.8 pycparser==2.19 pycryptodomex==3.4.7 pygments==2.3.1 diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 4653142f18..b79371f61d 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -247,7 +247,7 @@ pyasn1-modules==0.2.4 pyasn1==0.4.5 pycodestyle==2.5.0 pycontracts==1.7.1 -pycountry==1.20 +pycountry==18.12.8 pycparser==2.19 pycryptodomex==3.4.7 pydispatcher==2.0.5 diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index ba777092e5..ff031bb6b9 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -238,7 +238,7 @@ pyasn1-modules==0.2.4 # via service-identity pyasn1==0.4.5 # via pyasn1-modules, service-identity pycodestyle==2.5.0 pycontracts==1.7.1 -pycountry==1.20 +pycountry==18.12.8 pycparser==2.19 pycryptodomex==3.4.7 pydispatcher==2.0.5 # via scrapy