Skip to content

extract_assets() in extractor.py gives 'str' object has no attribute 'type' #145

Closed

Description

@Numendacil

Code
A snippet of the code section that cases the bug or error.

extractor.py

Error
The error message that is produced by python.

'str' object has no attribute 'type'

Bug
A description of what you expect to happen/see and what actually happens.

Call sorted on the dict only returns the key, to obtain the key value pairs i think .items() should be added

container = sorted(env.container.items(), key=lambda x: defaulted_export_index(x[1].type))

To Reproduce

  • a copy of the file that causes the problem
  • following data:
    • Python version 3.9
    • UnityPy version 1.9.16
from UnityPy.tools.extractor import extract_assets

extract_assets(src="https://github.com/path/to/src", dst='/path/to/dst', use_container=True)

Activity

  1. added a commit that references this issue on Nov 25, 2022
    343f56c
  2. linked a pull request that will close this issueFix #145 #163on Nov 25, 2022
  3. added a commit that references this issue on Nov 25, 2022
    2896495
  4. K0lb3 commented on Nov 25, 2022

    @K0lb3
    Owner

    Sorry for the late response,
    but it's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions