Skip to content

1.9.21 breaks loading files with stripped Unity version #158

Description

@erikchan002

Code

import UnityPy
UnityPy.config.FALLBACK_UNITY_VERSION = "2020.3.32f1" 
env = UnityPy.load("res001_no001.zip")

Error

Error loading, reverting to EndianBinaryReader:
 'NoneType' object has no attribute 'groups'

Bug
This is a regression caused by #157 and does not happen with UnityPy 1.9.20

version = tuple(map(int, reVersion.match(self.version_engine).groups()))

To Reproduce

  • a copy of the file that causes the problem
  • following data:
    • Python version 3.10.8
    • UnityPy version 1.9.21

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