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

The 'pandas_profiling' package was not installed in a way that PackageLoader understands. #430

Closed
3 tasks done
Mina4ever opened this issue Sep 22, 2023 · 4 comments
Closed
3 tasks done

Comments

@Mina4ever
Copy link

Quick Checks

  • I have read/searched in the help post
  • I have searched other issues, looking for an issue similar to mine
  • I have made sure my application/script runs before trying to package

Describe the bug
When trying to launch the output "exe" I faced the below issue
ValueError: The 'pandas_profiling' package was not installed in a way that PackageLoader understands.

To Reproduce
Steps to reproduce the behavior (install dependencies, do this in the auto-py-to-exe UI):
1- I launched auto-py-to-exe GUI.
2- I extracted python script in py file (attached below)
3- In auto-py-to-exe GUI , I have choose "file only" then process
4- Whole process run successfully.
5- When trying to launch the output "exe" I faced the below issue
Traceback (most recent call last):
File "DataQuilaty.py", line 8, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "pandas_profiling_init
.py", line 8, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "pandas_profiling\compare_reports.py", line 8, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "pandas_profiling\profile_report.py", line 26, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "pandas_profiling\report\presentation\flavours\html_init
.py", line 1, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "pandas_profiling\report\presentation\flavours\html\alerts.py", line 2, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "pandas_profiling\report\presentation\flavours\html\templates.py", line 11, in
File "jinja2\loaders.py", line 323, in init
ValueError: The 'pandas_profiling' package was not installed in a way that PackageLoader understands.

# If you have example code, please provide a minimal reproducible example: 
import pandas as pd
from pandas_profiling import ProfileReport
import cx_Oracle
import tkinter as tk
prof = ProfileReport(df)

Expected behavior
A clear and concise description of what you expected to happen.

Your Environment:

  • Python version (3.9.17):
  • auto-py-to-exe version (2.38.0):
  • PyInstaller version (5.13.2):
  • Eel version (0.16.0):
    DataQuilaty.txt
@Mina4ever Mina4ever added the bug Something isn't working label Sep 22, 2023
@github-actions
Copy link

👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.

Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.

@brentvollebregt
Copy link
Owner

brentvollebregt commented Sep 22, 2023

It appears this may be an issue with the pandas_profiling library itself - not auto-py-to-exe/PyInstaller. Doing a quick search for "pyinstaller" in the repo for this library, points me to ydataai/ydata-profiling#942 - this could be discussed more in ydataai/ydata-profiling#968.

@brentvollebregt brentvollebregt removed the bug Something isn't working label Sep 22, 2023
@brentvollebregt brentvollebregt removed their assignment Sep 22, 2023
@Mina4ever
Copy link
Author

I went through all the above opened discussions and issues forms and I can't find any resolving for it , also I don't know where the below pieces of code should be inserted into ? :

Initializing Jinja

if getattr(sys, 'frozen', False):
# Support for PyInstaller
bundle_dir = sys._MEIPASS
package_loader = jinja2.FileSystemLoader(bundle_dir)
else:
package_loader = jinja2.PackageLoader(
"pandas_profiling", "report/presentation/flavours/html/templates"
)

@brentvollebregt
Copy link
Owner

I have not used this library before so I'm unable to offer any assistance with it. I recommend asking in the discussion I linked as it's the same issue and in the repo of the library you are having the issue with.

@brentvollebregt brentvollebregt closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2023
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