rmm icon indicating copy to clipboard operation
rmm copied to clipboard

`rmm sync` doesn't work after some use : `AttributeError: 'NoneType' object has no attribute 'lower'`

Open Lippiece opened this issue 2 years ago • 2 comments

I have downloaded a bunch of mods, and now every rmm sync results in this:

Log
Steam Console Client (c) Valve Corporation - version 1702079268
-- type 'quit' to exit --
Loading Steam API...dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
OK

Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
Downloading item 2801102127 ...
Success. Downloaded item 2801102127 to "/tmp/rmm-ktaoq_c5/.steam/SteamApps/workshop/content/294100/2801102127" (1230364 bytes) Downloading item 2898000489 ...
Success. Downloaded item 2898000489 to "/tmp/rmm-ktaoq_c5/.steam/SteamApps/workshop/content/294100/2898000489" (303223 bytes) Downloading item 1279012058 ...
Success. Downloaded item 1279012058 to "/tmp/rmm-ktaoq_c5/.steam/SteamApps/workshop/content/294100/1279012058" (1530838 bytes) multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/rmm/mod.py", line 129, in create_from_path
    return Mod(
           ^^^^
  File "<string>", line 16, in __init__
  File "/usr/lib/python3.11/site-packages/rmm/mod.py", line 43, in __post_init__
    self.after = [item.lower() for item in self.after]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/rmm/mod.py", line 43, in <listcomp>
    self.after = [item.lower() for item in self.after]
                  ^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/rmm", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/usr/lib/python3.11/site-packages/rmm/cli.py", line 569, in run
    globals()[command](sys.argv, manager)
  File "/usr/lib/python3.11/site-packages/rmm/cli.py", line 98, in wrapper_func
    func(*args, **kwargs)
  File "/usr/lib/python3.11/site-packages/rmm/cli.py", line 321, in sync
    manager.sync_mods(queue)
  File "/usr/lib/python3.11/site-packages/rmm/manager.py", line 72, in sync_mods
    steam_mods, steam_cache_path = SteamDownloader.download(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/rmm/steam.py", line 111, in download
    return (ModFolder.read(mod_path), mod_path)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/rmm/mod.py", line 157, in read
    p.map(
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/multiprocessing/pool.py", line 774, in get
    raise self._value
AttributeError: 'NoneType' object has no attribute 'lower'

Lippiece avatar Jan 11 '24 12:01 Lippiece

Hi,

I am facing the same issue with the config command.

roland@singularity:~$ rmm -p ~/.steam/debian-installation/steamapps/common/RimWorld/Mods/ config
/home/roland/.steam/debian-installation/steamapps/common/RimWorld/Mods/
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/mod.py", line 129, in create_from_path
    return Mod(
  File "<string>", line 16, in __init__
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/mod.py", line 43, in __post_init__
    self.after = [item.lower() for item in self.after]
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/mod.py", line 43, in <listcomp>
    self.after = [item.lower() for item in self.after]
AttributeError: 'NoneType' object has no attribute 'lower'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/roland/.local/bin/rmm", line 8, in <module>
    sys.exit(run())
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/cli.py", line 569, in run
    globals()[command](sys.argv, manager)
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/cli.py", line 98, in wrapper_func
    func(*args, **kwargs)
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/cli.py", line 351, in config
    data = manager.order_all_mods()
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/manager.py", line 174, in order_all_mods
    installed_mods = self.installed_mods()
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/manager.py", line 110, in installed_mods
    mods = ModFolder.read_dict(self.config.mod_path)
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/mod.py", line 169, in read_dict
    return Mod.list_to_dict(ModFolder.read(path))
  File "/home/roland/.local/lib/python3.10/site-packages/rmm/mod.py", line 157, in read
    p.map(
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
AttributeError: 'NoneType' object has no attribute 'lower'

montaropdf avatar Jun 16 '24 18:06 montaropdf

I suggest moving to https://github.com/RimSort/RimSort

Lippiece avatar Jun 16 '24 18:06 Lippiece