8000 Pyinstaller packaging not working for version 4.52 · Issue #3531 · fonttools/fonttools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Pyinstaller packaging not working for version 4.52 #3531

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

Closed
jowlo opened this issue May 27, 2024 · 6 comments
Closed

Pyinstaller packaging not working for version 4.52 #3531

jowlo opened this issue May 27, 2024 · 6 comments

Comments

@jowlo
Copy link
jowlo commented May 27, 2024

When updating an application that is packaged using pyinstaller to run on windows, upon application start the new logic to support the VARC tables produces this load time error.

  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "fontTools\subset\__init__.py", line 2634, in <module>
  File "fontTools\subset\util.py", line 14, in wrapper
AssertionError: Oops, table class not found.

While i haven't investigated too far down, this is most likely related due to pyinstaller not being able to automatically find dynamically imported classes and not packaging them correctly at "build" time.

This error can be fixed here or in the pyinstaller project (as a new hooks in the pyinstaller-hooks-contrib repository). However, I struggle to find which classes are dynamically loaded in this case.

Downgrading to fonttools to 4.51 does not produce the issue.

@jowlo jowlo changed the title Pyinstaller packaging not working v4.52 Pyinstaller packaging not working for version 4.52 May 27, 2024
@justvanrossum
Copy link
Collaborator
justvanrossum commented May 27, 2024

Ha, I thought I might be the only one suffering from this. I fixed it here:

This actually warrants a patch release.

@jowlo
Copy link
Author
jowlo commented May 27, 2024

Oh, nice! My main motivation to open the issue was that I couldn't find anyone else running into this error, but i guess a few people will in the next days.

I guess most projects have fonttools as some transitive dependency (from fpdf2 in my case) and being able to google that error message hopefully helps.

Thanks for the incredibly quick fix and response!

@justvanrossum
Copy link
Collaborator

Right, it is clear that I underestimated the reach of this problem. @anthrotype, can you trigger a release?

@jowlo
Copy link
Author
jowlo commented May 27, 2024

FWIW, using 369a213 my project is packaged correctly and runs as expected.

@anthrotype
Copy link
Member

I’m away from laptop right now, I can do it tomorrow, or else @khaledhosny can do

@khaledhosny
Copy link
Collaborator

I just released 4.52.2, should hit PyPI soon (hopefully).

liZe added a commit to Kozea/WeasyPrint that referenced this issue Dec 7, 2024
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

4 participants
0