hugsy / cemu

Cheap EMUlator: lightweight multi-architecture assembly playground
MIT License
946 stars 101 forks source link

TypeError: sequence item 0: expected str instance, NoneType found #55

Closed electricalgorithm closed 3 years ago

electricalgorithm commented 3 years ago

Python 3.7.0, installed using pip 10.0.1

Traceback (most recent call last):
  File "c:\users\gokha\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\gokha\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\gokha\AppData\Local\Programs\Python\Python37\Scripts\cemu.exe\__main__.py", line 9, in <module>
  File "c:\users\gokha\appdata\local\programs\python\python37\lib\site-packages\cemu\__main__.py", line 8, in main
    from cemu.core import Cemu
  File "c:\users\gokha\appdata\local\programs\python\python37\lib\site-packages\cemu\core.py", line 13, in <module>
    from .const import ICON_PATH
  File "c:\users\gokha\appdata\local\programs\python\python37\lib\site-packages\cemu\const.py", line 23, in <module>
    CONFIG_FILEPATH    = os.sep.join([HOME, ".cemu.ini"])
electricalgorithm commented 3 years ago

Solved with changing Home to my C:/Users/gokha folder but not every Windows user can deal with this.

flawiddsouza commented 3 years ago

According to https://stackoverflow.com/questions/4028904/how-to-get-the-home-directory-in-python, In file, cemu/const.py:

HOME               = os.getenv("HOME")

works only on linux, while this is more cross-platform:

HOME               = os.path.expanduser("~")