nautilus-scripts-manager crashed with FileNotFoundError in __main__: [Errno 2] No such file or directory: '/home/username/.local/share/nautilus/scripts'

Bug #1440455 reported by Arthur
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nautilus-scripts-manager (Ubuntu)
New
Medium
Unassigned

Bug Description

Further investigation reveals this line from nautilus-scripts-manager:

SCRIPTS_OWN_FOLDER = os.path.join(GLib.get_user_data_dir(),
                                  'nautilus',
                                  'scripts')
if not os.path.exists(SCRIPTS_OWN_FOLDER):
    os.mkdir(SCRIPTS_OWN_FOLDER)

In this case ~/.share/nautilus did not exist, so os.mkdir choked on attempting to create ~/.share/nautilus/scripts. For myself I replaced os.mkdir with os.makedirs. The try seems redundant with the os.path.exists check, but I left it in anyway.

if not os.path.exists(SCRIPTS_OWN_FOLDER):
        try:
                os.makedirs(SCRIPTS_OWN_FOLDER)
        except OSError as exc:
                if exc.errno == errno.EEXIST and os.path.isdir(SCRIPTS_OWN_FOLDER):
                        pass

ProblemType: Crash
DistroRelease: Ubuntu 15.04
Package: nautilus-scripts-manager 2.0-1
ProcVersionSignature: Ubuntu 3.19.0-11.11-generic 3.19.3
Uname: Linux 3.19.0-11-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.17-0ubuntu1
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Apr 4 16:03:44 2015
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/nautilus-scripts-manager
InstallationDate: Installed on 2015-04-03 (1 days ago)
InstallationMedia: Xubuntu 15.04 "Vivid Vervet" - Beta amd64 (20150326)
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/nautilus-scripts-manager
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/nautilus-scripts-manager']
SourcePackage: nautilus-scripts-manager
Title: nautilus-scripts-manager crashed with FileNotFoundError in __main__: [Errno 2] No such file or directory: '/home/username/.local/share/nautilus/scripts'
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/nautilus-scripts-manager", line 44, in <module>
     os.mkdir(SCRIPTS_OWN_FOLDER)
 FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.local/share/nautilus/scripts'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Arthur (enkidu-ak) wrote :
information type: Private → Public
tags: removed: need-duplicate-check
Changed in nautilus-scripts-manager (Ubuntu):
importance: Undecided → Medium
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.