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

Error: Can not loadUE3 packages #21

Open
Sven-vh opened this issue May 10, 2024 · 5 comments
Open

Error: Can not loadUE3 packages #21

Sven-vh opened this issue May 10, 2024 · 5 comments

Comments

@Sven-vh
Copy link

Sven-vh commented May 10, 2024

I created a basic blueprint in the latest Unreal version, version 5.4.1, but when I try to open it I get an error:
An error occurred: Can not load UE3 packages.

uasset_path is the path to a .uasset file.

def get_asset_type(uasset_path):
    try:
        print(f"Reading uasset file: {uasset_path}")
        provider = DefaultFileProvider(os.path.dirname(uasset_path), VersionContainer(EUEVersion.LATEST))
        provider.initialize()

        uasset_stream = BinaryStream(uasset_path)

        package_reader = LegacyPackageReader(uasset_stream, None, provider=provider)
        package = package_reader.read_package()
        primary_export = package.exports[0]
        return primary_export.export_type
    except Exception as e:
        print(f"An error occurred: {e}")
        return None
@MinshuG
Copy link
Owner

MinshuG commented May 10, 2024

UE5.4 is probably too new for pyue4parse and this package is not updated anymore.
use this https://github.com/FabianFG/CUE4Parse

@Sven-vh
Copy link
Author

Sven-vh commented May 10, 2024

UE5.4 is probably too new for pyue4parse and this package is not updated anymore. use this https://github.com/FabianFG/CUE4Parse

Thanks for the quick response, the problem with CUE4Parse is that it's for C#. I'm working in Python. The only thing I need to know is what type of asset it is, is there a workaround for this?

@MinshuG
Copy link
Owner

MinshuG commented May 10, 2024

Is the asset you are trying to read cooked?

@Sven-vh
Copy link
Author

Sven-vh commented May 15, 2024

Is the asset you are trying to read cooked?

Sorry for the late reply but, No, they are not cooked.
Does this make it easier?

@MinshuG
Copy link
Owner

MinshuG commented May 15, 2024

Library is only tested with cooked assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants