I have an error with apport that has persisted over Ubuntu 11.10, 12.04 and 12.10. I have reported a bug but this is only happening in one of my systems, only in one account and not when I run it with sudo, so it is hard that anybody will look at this problem.

So my question is if anybody knows what configuration files of apport may be causing this error (I put the full description below). I'm reluctant to create a new account and move all my stuff there just because of this, it must be something in my user account that causes this error but I haven't been able to identify any apport specific file in my home directory.

Here is the description of the error that apport gives:

Whenever I run anything related to apport (ubuntu-bug, etc), it aborts with a window that says nothing to repeat. If I run it from the terminal I get:

.Traceback (most recent call last):
  File "/usr/bin/apport-cli", line 365, in 
    if not app.run_argv():
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 543, in run_argv
    return self.run_report_bug()
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 348, in run_report_bug
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 912, in collect_info
  File "/usr/lib/python2.7/dist-packages/apport/REThread.py", line 34, in run
    self._retval = self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 1297, in anonymize
    replacements.append((re.compile('\\b%s\\b' % s), 'User Name'))
  File "/usr/lib/python2.7/re.py", line 190, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.7/re.py", line 242, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat
  • what is your username? – green Sep 10 '12 at 13:12
  • My username is "wgarcia". This happens in my desktop, in my laptop I use the same username and it works fine. – wagafo Sep 25 '12 at 6:56

This is a bug or rather a misfeature in Python and not apport.

If you're familiar with regular expressions, here is a stackoverflow question: https://stackoverflow.com/questions/5869650/python-regex-strange-behavior.

The user complains:

Compilation of (a*)* or (a*|b)* throws an error:

raise error, v # invalid expression sre_constants.error: nothing to repeat

According to the first answer (as at the moment):

It's complaining that if a* matches nothing, it doesn't know how to capture 0 or more "nothings".

There are bug reports filed for the same:

Also, there is a bug at launchpad:

There are several workarounds suggested:

  • Commenting out lines 1296 and 1297 of /usr/lib/python2.7/dist-packages/apport/report.py.
  • Changing user name or creating a new user account.
| improve this answer | |
  • Thanks, I already had come out with the commenting of the lines myself as a workaround. I was reluctant to create a new account just because of this simple problem. What I don't understand is why in other systems where I use exactly the same username and more or less the same Ubuntu configuration I never see this problem, but never mind, this seems something that eventually will get fixed. – wagafo Sep 29 '12 at 7:10
  • 1
    Finally this was sorted out as a problem related to having a "+" sign in the telephone field for the user profile, and is being worked out in the following bug report: bugs.launchpad.net/ubuntu/+source/apport/+bug/985049 – wagafo Apr 3 '13 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.