Skip to content

NameError: name 'sp' is not defined in export/ShaderConverter.py #47

Closed

Description

@yizhenwang2002

Code

sp.append(buff.decode("utf8"))

Error
NameError: name 'sp' is not defined

Bug
I suppose this is a typo.

sb.append(buff.decode("utf8"))

After fixing this typo, I encountered AttributeError: 'memoryview' object has no attribute 'decode'.

sb.append(buff.tobytes().decode("utf8"))

And this fixes.

To Reproduce

  • An ab file from IOS platform may cause this issue.
  • following data:
    • Python version 3.8
    • UnityPy version 1.7.6

Activity

  1. added a commit that references this issue on May 24, 2021
  2. K0lb3 commented on May 24, 2021

    @K0lb3
    Owner

    Thanks for reporting the typo and the following problem.

  3. added a commit that references this issue on Sep 14, 2025
    fac856d
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