Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Error with bash and user without home-directory #72

Open
Bissel opened this issue Jan 15, 2018 · 3 comments
Open

Error with bash and user without home-directory #72

Bissel opened this issue Jan 15, 2018 · 3 comments

Comments

@Bissel
Copy link

Bissel commented Jan 15, 2018

If you start the script with an user without a home directory e.g. apache an error occur:

File "/usr/local/lib/python3.5/dist-packages/samsungctl/__main__.py", line 97, in main
    config = _read_config()
File "/usr/local/lib/python3.5/dist-packages/samsungctl/__main__.py", line 31, in _read_config
    directories.append(os.path.join(os.getenv("HOME"), ".config"))
File "/usr/lib/python3.5/posixpath.py", line 89, in join
    genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.5/genericpath.py", line 143, in _check_arg_types
    (funcname, s.__class__.__name__)) from None 

A fix is maybe add a argument --noconf
and a real fix would be check if the user has a home directory

@Ape
Copy link
Owner

Ape commented Jan 15, 2018

@Bissel Thanks for reporting this. Does #73 fix it?

@Ape
Copy link
Owner

Ape commented Jan 15, 2018

Actually, could you also test if #35 alone fixes it, too?

@MP-Munich
Copy link

@Ape Thanks for fixing this!

#73 works well.

Output with #35 on my Windows 11 23H2 system:
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Temp\samsungctl-master - Copy\samsungctl\__main__.py", line 1, in <module> import appdirs ModuleNotFoundError: No module named 'appdirs'

Could you please merge #73 to master?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants