[Jaunty] toolbox.py crashed with AttributeError in join() when using sudo

Bug #361541 reported by Jan Ischebeck
6
Affects Status Importance Assigned to Milestone
hplip (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: hplip

When starting hp-toolbox using sudo the following error occurs:

jan@PUNDIT:~$ sudo hp-toolbox
[sudo] password for jan:
warning: hp-toolbox should not be run as root/superuser.

HP Linux Imaging and Printing System (ver. 3.9.2)
HP Device Manager ver. 15.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 254, in <module>
    toolbox = DevMgr5(__version__, device_uri, None)
  File "/usr/share/hplip/ui4/devmgr5.py", line 182, in __init__
    self.user_settings = UserSettings()
  File "/usr/share/hplip/ui4/ui_utils.py", line 98, in __init__
    QSettings.__init__(self, os.path.join(prop.user_dir, 'hplip.conf'), QSettings.IniFormat)
  File "/usr/lib/python2.6/posixpath.py", line 67, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
jan@PUNDIT:~$

ProblemType: Crash
Architecture: i386
CurrentDmesg:
 [ 42.860023] virbr0: no IPv6 routers present
 [ 106.624035] Clocksource tsc unstable (delta = -272343052 ns)
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/share/hplip/toolbox.py
InterpreterPath: /usr/bin/python2.6
Lpstat:
 Gerät für OfficeJet_T: hp:/par/OfficeJet_T_Series?device=/dev/parport0
 Gerät für OfficeJet_T1: hp:/par/OfficeJet_T_Series?device=/dev/parport0
 Gerät für OfficeJet_T_fax: hpfax:/par/OfficeJet_T_Series?device=/dev/parport0
Lsusb:
 Bus 001 Device 003: ID 0424:2228 Standard Microsystems Corp. 9-in-2 Card Reader
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel Mouse
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia
Package: hplip-data 3.9.2-3ubuntu4
PackageArchitecture: all
Papersize: a4
PpdFiles:
 OfficeJet_T: HP Officejet T Series hpijs, 3.9.2
 HP_OfficeJet_T_Series_LPT_parport0_HPLIP: HP OfficeJet T65 Foomatic/hpijs (recommended)
 HP_OfficeJet_T_Series_LPT_parport0_HPLIP_HP_Fax: HP Fax - HPLIP 1.6.10
 OfficeJet_T1: HP Officejet T series Foomatic/hpijs, hpijs 2.8.7
 OfficeJet_T_fax: HP Fax
ProcAttrCurrent: unconfined
ProcCmdLine: root=UUID=1ee41cd1-c6ff-4da1-8fae-774d638b15ce ro quiet splash
ProcCmdline: python /usr/bin/hp-toolbox
ProcEnviron:
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.28-11.41-generic
PythonArgs: ['/usr/bin/hp-toolbox']
SourcePackage: hplip
Title: toolbox.py crashed with AttributeError in join()
UserGroups:

Revision history for this message
Jan Ischebeck (siesel) wrote :
tags: removed: need-duplicate-check
visibility: private → public
Revision history for this message
Jan Ischebeck (siesel) wrote :

Unfortunately the "original" bug is hidden.

This bug is triggered, because the global property "prop.user_dir" is set to None in
file "/usr/share/hplip/base/g.py" line 165 ff:

  else:
            # If running as root, conf file is None
            prop.user_dir = None
            prop.user_config_file = None
            ConfigBase.__init__(self, None)

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.