Code Yarns ‍👨‍💻
Tech BlogPersonal Blog


📅 2015-Nov-02 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ error, gcalcli, parsedatetime ⬩ 📚 Archive


I tried running gcalcli and got this error:

$ gcalcli
Traceback (most recent call last):
  File "/usr/bin/gcalcli", line 392, in <module>
    class gcalcli:
  File "/usr/bin/gcalcli", line 410, in gcalcli
    dateParser    = DateTimeParser()
  File "/usr/bin/gcalcli", line 335, in __init__
    self.pdtCalendar = parsedatetime.Calendar();
  File "/usr/lib/python2.7/dist-packages/parsedatetime/", line 216, in __init__
    self.ptc = Constants()
  File "/usr/lib/python2.7/dist-packages/parsedatetime/", line 1733, in __init__
    self.locale = pdtLocales['icu'](self.localeID)
  File "/usr/lib/python2.7/dist-packages/parsedatetime/", line 151, in __init__ = pyicu.Locale(localeID)
icu.InvalidArgsError: (<type 'icu.Locale'>, '__init__', (None,))


This is a well known bug in the parsedatetime package as described here.

The solution is to remove the package installed from Ubuntu archives and install a recent version of it from the Python Package Index:

$ sudo apt-get remove python-parsedatetime

$ sudo pip install --upgrade parsedatetime

Tried with: Ubuntu 14.04

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧