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

current folder contents gets copied matplotlib mpl-data #5731

Closed
RubendeBruin opened this issue Apr 13, 2021 · 3 comments
Closed

current folder contents gets copied matplotlib mpl-data #5731

RubendeBruin opened this issue Apr 13, 2021 · 3 comments

Comments

@RubendeBruin
Copy link

Apologies for this cripple bug report. Its an issue that just doesn't fit the template.

When compiling a project that makes use of matplotlib the contents of the current directory (cd) gets copied into dist/appname/matplotlib/mpl-data

That means that for example the ./build folder gets copied to
./dist/appname/matplotlib/mpl-data/build

Pretty sure this is caused by:

94879 INFO: Loading module hook 'hook-matplotlib.py' from 'c:\\miniconda3\\envs\\grillex_deploy\\lib\\site-packages\\PyInstaller\\hooks'...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'matplotlib' has no attribute '_get_data_path'
@rokm
Copy link
Member

rokm commented Apr 13, 2021

Duplicate of #5567, fixed by #5568. You'll need to use develop branch until next PyInstaller release if you want to use matplotlib 3.4.x.

@rokm rokm closed this as completed Apr 13, 2021
@RubendeBruin
Copy link
Author

Ah, ok. Did already dive into the import hook and did not see any obvious errors there. The print statement did yield the correct path.
Thanks!

@rokm
Copy link
Member

rokm commented Apr 13, 2021

Yeah, the hook was using a private function _get_data_path instead of public get_data_path, and the former was removed in matplotlib 3.4.0. So the hook effectively received an empty path, which corresponds to current working directory.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants