'babel' has no attribute 'Locale'

Bug #1890086 reported by kylehase on 2020-08-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rapid Photo Downloader
Damon Lynch

Bug Description

v0.9.24 on Linux Mint 19.3 Tricia

When opening preferences, the following error is produced and preferences will not open.

ERROR An unhandled exception occurred
ERROR Traceback (most recent call last):
  File "/home/kylehase/.local/lib/python3.6/site-packages/raphodo/rapid.py", line 2613, in doPreferencesAction
    dialog = PreferencesDialog(prefs=self.prefs, parent=self)
  File "/home/kylehase/.local/lib/python3.6/site-packages/raphodo/preferencedialog.py", line 295, in __init__
  File "/home/kylehase/.local/lib/python3.6/site-packages/raphodo/preferencedialog.py", line 890, in setLanguageWidgetValues
    for code, language in available_languages(display_locale_code=self.prefs.language):
  File "/home/kylehase/.local/lib/python3.6/site-packages/raphodo/utilities.py", line 1205, in available_languages
    babel_sample = babel.Locale.parse('en').get_display_name(locale_code)
AttributeError: module 'babel' has no attribute 'Locale'

kylehase (kyle-hasegawa) wrote :
Damon Lynch (dlynch3) on 2020-08-07
Changed in rapid:
status: New → Triaged
milestone: none → 0.9.25
assignee: nobody → Damon Lynch (dlynch3)
Damon Lynch (dlynch3) wrote :

Thanks for your bug report. Can you please run the following command from a terminal and copy and paste the results here in this bug report:

python3 -m pip show babel


kylehase (kyle-hasegawa) wrote :

Hi Damon,

Here's the output.

$ python3 -m pip show babel
Name: Babel
Version: 2.8.0
Summary: None
Home-page: None
Author: None
Author-email: None
License: None
Location: /home/kylehase/.local/lib/python3.6/site-packages
Required-by: rapid-photo-downloader

Damon Lynch (dlynch3) wrote :

Please see the attached screenshot of me running pip show from the command line, as well as importing babel from in Python 3 on Mint 19.3.

I would guess that something has gone wrong with your install of Babel, for reasons I do not know.

Try this command, and then repeat once more to clear out any remnants (do not prefix with sudo):

python3 -m pip uninstall babel

then install again:

python3 -m pip install --user babel

kylehase (kyle-hasegawa) wrote :

Hi Damon. I ran those commands without sudo and it now works without errors. Thank you.
Here's the output of the commands for the record.

$ python3 -m pip uninstall babel
Found existing installation: Babel 2.8.0
Uninstalling Babel-2.8.0:
  Would remove:
Proceed (y/n)? y
  Successfully uninstalled Babel-2.8.0

$ python3 -m pip install --user babel
Requirement already satisfied: babel in /usr/lib/python3/dist-packages (2.4.0)
WARNING: You are using pip version 20.2; however, version 20.2.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

$ python3 -m pip show babel
Name: Babel
Version: 2.4.0
Summary: Internationalization utilities
Home-page: http://babel.pocoo.org/
Author: Armin Ronacher
Author-email: <email address hidden>
License: BSD
Location: /usr/lib/python3/dist-packages
Required-by: rapid-photo-downloader

Changed in rapid:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers