Spoons / rmm

An Open Source RimWorld mod package manager and sorting tool.
GNU General Public License v3.0
24 stars 7 forks source link

TypeError: expected str, bytes or os.PathLike object, not list #2

Closed AOx0 closed 2 years ago

AOx0 commented 2 years ago

Description rmm crashes with error:

 TypeError: expected str, bytes or os.PathLike object, not list

Reproduction Tried using list:

  1. run 'python3 -m rmm list' <- Crashes

And also tried with query:

  1. run 'python3 -m rmm query' <- Crashes

Info OS: macOS Monterey 12.0.1 Python: 3.10.1 RMM: 0.1.0

Full error:

alejandro@Mac ~ % python3 -m rmm query -p /Applications/RimWorld.app
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/alejandro/Library/Python/3.10/lib/python/site-packages/rmm/__main__.py", line 5, in <module>
    t = CLI()
  File "/Users/alejandro/Library/Python/3.10/lib/python/site-packages/rmm/core.py", line 491, in __init__
    self.path = find_game(self.path)
  File "/Users/alejandro/Library/Python/3.10/lib/python/site-packages/rmm/core.py", line 483, in find_game
    if not os.path.basename(path) == "Mods":
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py", line 142, in basename
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not list

By the way, I'm starting a similar project, inspired by yours, but developed from scratch with Rust named rwm available here.

Spoons commented 2 years ago

Thanks for submitting a bug report. I've pushed an update out. Let me know if it fixes the issue. Best of luck on your rewrite. I'm glad you found my project inspirational.