Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent error when extracting files from the game Autonauts #192

Open
sparr opened this issue Jul 4, 2023 · 0 comments
Open

Intermittent error when extracting files from the game Autonauts #192

sparr opened this issue Jul 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@sparr
Copy link
Contributor

sparr commented Jul 4, 2023

Code
The code in question lives at https://github.com/sparr/vgm-extractor/tree/548abc7d017edfad06dd55170c9a0c7269c56dff but I have not reduced this to a test case yet. I will try to do so when I have a chance.

It is effectively attempting to do this:

extract_assets(
    "Autonauts_Data/sharedassets0.assets",
    ".",
    use_container = False,
    append_path_id = False,
    asset_filter = asset_filter,
)

This problem also occurs with Slipways_Data/resources.assets from the game Slipways.

Error

  File "/home/sparr/.local/share/virtualenvs/vgm-extractor-1oHW3IDG/lib/python3.11/site-packages/UnityPy/tools/extractor.py", line 138, in extract_assets
    export_obj(
  File "/home/sparr/.local/share/virtualenvs/vgm-extractor-1oHW3IDG/lib/python3.11/site-packages/UnityPy/tools/extractor.py", line 69, in export_obj
    return export_func(obj, fp, extension)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sparr/.local/share/virtualenvs/vgm-extractor-1oHW3IDG/lib/python3.11/site-packages/UnityPy/tools/extractor.py", line 234, in exportAudioClip
    if len(samples) == 0:
       ^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Bug
The samples here is None about half the time when I try to extract files from this game, and there is no error the other half. There may be a race condition of some sort?

To Reproduce

  1. Use python 3.11.3 and UnityPy 1.10.1 plus Handle relative and case insensitive file paths #191
  2. Clone the vgm-extractor repo linked above
  3. Install the game Autonauts via Steam
  4. src/vgm-extractor.py -vvvv -o tmp --rescan --overwrite --steamlibrarypath ~/.steam/steam "Autonauts"
@sparr sparr added the bug Something isn't working label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant