MobaHinted / client

A fast, ad-free League of Legends client. Beyond that, it is more reliable, lighter, open-source, packed with your favorite overlays plus brand new, fresh overlays coaches have been telling us to use the equivalent of for years.
https://mobahinted.app
Other
24 stars 1 forks source link

Missing data folder #3

Closed schblondie closed 1 year ago

schblondie commented 1 year ago

Heyja, when cloning your repo the data folder is missing which results in the following errors, due to missing ./data/settings.dat & ./data/champion_roles.dat:

Traceback (most recent call last):
  File "D:\mobahinted\main.py", line 17, in <module>
    import hinter
  File "D:\mobahinted\hinter\__init__.py", line 53, in <module>
    settings.load_settings()
  File "D:\mobahinted\hinter\settings.py", line 92, in load_settings
    if hinter.data.management.file_empty(hinter.data.constants.PATH_SETTINGS_FILE):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\mobahinted\hinter\data\management.py", line 14, in file_empty
    return os.stat(file).st_size == 0
           ^^^^^^^^^^^^^
FileNotFoundError: [WinError 3] The system cannot find the path specified: './data/settings.dat'
Traceback (most recent call last):
  File "D:\mobahinted\main.py", line 17, in <module>
    import hinter
  File "D:\mobahinted\hinter\__init__.py", line 57, in <module>
    want_new_champion_role_data = hinter.data.management.Clean.is_file_older_than_x_days(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\mobahinted\hinter\data\management.py", line 94, in is_file_older_than_x_days
    file_time = os.path.getmtime(file)
                ^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen genericpath>", line 67, in getmtime
FileNotFoundError: [WinError 2] The system cannot find the file specified: './data/champion_roles.dat'

When manually adding the files, there is an error thrown, due to ./data/champion_roles.dat being empty:

Traceback (most recent call last):
  File "D:\mobahinted\main.py", line 17, in <module>
    import hinter
  File "D:\mobahinted\hinter\__init__.py", line 72, in <module>
    ChampionRoleData = pickle.load(role_data_file)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
EOFError: Ran out of input

I'm guessing you're having the data folder ignored due to private information in settings.dat, but without the champion data the code will not run.

zbee commented 1 year ago

Apologies, data environment setup was not being done correctly. Working on a commit now to fix that.

Just as a note: there is nothing private in /data, just cached API data that expires too quickly for it to make sense to share.

You'll still need an API key to run, but when I push this you should no longer get those errors.