amazing-qr
amazing-qr copied to clipboard
'os.path.expanduser' func create the temp dir question
-
Fixed: Change 'os.path.expanduser' func to 'tempfile.gettempdir' func for create the temp dir.
-
Question: When you install with root, the normal account will be called with the following error:
Traceback (most recent call last):
File "/usr/bin/myqr", line 9, in <module>
load_entry_point('MyQR==2.3.1', 'console_scripts', 'myqr')()
File "/usr/lib/python2.7/site-packages/MyQR/terminal.py", line 34, in main
args.directory
File "/usr/lib/python2.7/site-packages/MyQR/myqr.py", line 92, in run
os.makedirs(tempdir)
File "/usr/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/root/.myqr'
- Location: os.path.expanduser('~'):the value i get in my Linux system is root,so i try to fix it! I don't know much about python, so i am not sure this is a bug!