Skip to content

Fail to plot the data read from csv file, No module named 'packaging' #4109

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
Zyuangeorge opened this issue Mar 16, 2023 · 3 comments
Closed

Comments

@Zyuangeorge
Copy link

Zyuangeorge commented Mar 16, 2023

Hi,

I am currently using pyinstaller to pack my GUI. But I have encountered a problem:

Traceback (most recent call last):
  File "BMS_TYP.py", line 1264, in plotByPlotly
  File "cellDataPlot.py", line 84, in plotBatteryData
  File "plotly\basedatatypes.py", line 3390, in show
  File "_plotly_utils\importers.py", line 36, in __getattr__
  File "importlib\__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "plotly\io\_renderers.py", line 7, in <module>
ModuleNotFoundError: No module named 'packaging'

I use these codes to concatenate the paths to get the absolute path.
weightPath = os.path.join(os.path.abspath('.'), 'Data', dataFolder)
fileList = [os.path.join(weightPath, file) for file in list(os.listdir(weightPath))]
fileList.sort()
Then sort the list. After that, each CSV file is read using pandas and concatenated. The final data is plotted using plotly. But it fails to plot the data. The data can be plotted if it is not packed into .exe file.

@AaronStiff
Copy link
Contributor

This looks like a duplicate of #4080

@Zyuangeorge
Copy link
Author

Hi Aaron,

I used the same method in December 2022 and the generated .exe file works. It seems like there are some changes that happened during this period.

@nicolaskruchten
Copy link
Contributor

Yes, we changed things in version 5.13 and will try to fix them soon. In the meantime you may either install the packaging package manually or downgrade to Plotly v5.12.

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