Unhandled exception: TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str

Bug #215380 reported by Daniel Hahler
6
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: apport

I have entries like the following in /var/log/apport.log:

apport (pid 9923) Wed Apr 9 03:27:48 2008: called for pid 12999, signal 11
apport (pid 9923) Wed Apr 9 03:27:48 2008: Unhandled exception:
Traceback (most recent call last):
  File "/usr/share/apport/apport", line 244, in <module>
    info.add_proc_info(pid)
  File "/usr/lib/python2.5/site-packages/apport/report.py", line 351, in add_proc_info
    assert os.path.exists(self['ExecutablePath'])
  File "/usr/lib/python2.5/posixpath.py", line 171, in exists
    st = os.stat(path)
TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str

This is with Ubuntu Hardy, apport 0.107

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. Since apport catches exceptions, it is just a cosmetical problem. If we cannot read the executable path from /proc, then we lose anyway, and the best we can do is to gracefully ignore it.

Changed in apport:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Marco Rodrigues (gothicx) wrote :

I'm wondering if this is the correct way to do it.

=== modified file 'apport/report.py'
--- apport/report.py 2009-09-02 13:22:33 +0000
+++ apport/report.py 2009-09-10 20:34:32 +0000
@@ -343,7 +343,8 @@
             if self['ExecutablePath'].startswith('/%s/' % p):
                 self['ExecutablePath'] = self['ExecutablePath'][len('/%s' % p):]
                 break
- assert os.path.exists(self['ExecutablePath'])
+ if os.path.exists(self['ExecutablePath']):
+ assert os.path.exists(self['ExecutablePath'])

         # check if we have an interpreted program
         self._check_interpreted()

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in apport (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apport (Ubuntu) because there has been no activity for 60 days.]

Changed in apport (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.