Skip to content

Error loading modules: wrong file length #10

@The-city-not-present

Description

@The-city-not-present

There is some issue. I'll try to locate the problem but I'll post here for visibility first.

Sometimes with some of the files this tool works fine. But sometimes it creates the bundle, but then when importing the package from the bundle it breaks with unexpected and different errors. It was very hard to understand what is going on, but then I realized the piece of code that is loaded for the module is not ended at the right place but it includes the beginning of the next file. I've edited importer.template for debugging and edited get_code and added this next to compiled_code = compile...: I added with open(filename+'.sample.py','w',encoding='utf-8') as f: f.write(code) f.close() Given that, I can now see the module code that is loaded, and I see that the file does not end at the right place but there is a beginning of a next file added. This does not happen always, this happens with some of the files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions