The import XLRD
The from pyecharts. Charts import Bar
# open the Excel spreadsheet
Data=https://bbs.csdn.net/topics/xlrd.open_workbook (' xiaoshoushuju. XLSX)
Table=data sheets () [0] # to open the form in the first sheet
Names=[]
The sales=[]
For I in range (1, table. Nrows) :
Name=table. Row_values (I) [0]
Names. Append (name)
Sale=table. Row_values (I) [2]
Sales. Append (sale)
The bar=bar ()
Bar. Add_xaxis (names)
Bar. Add_yaxis (' business details table 'sales)
Bar. Render (' 1. HTML)
The following is the error message:
CodePudding user response:
Traceback (the most recent call last) :The File "pyecha. Py", line 2, the in & lt; module>
The from pyecharts. Charts import Bar
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages \ pyecharts \ set py", line 1, the in & lt; module>
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages, pyecharts, charts, set py", line 2, the in & lt; module>
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages \ pyecharts \ charts \ basic_charts \ bar py", line 1, the in & lt; module>
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages, pyecharts, options, set py", line 3, the in & lt; module>
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages \ pyecharts \ options \ charts_options py", line 3, the in & lt; module>
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages \ pyecharts \ globals py", line 5, in & lt; module>
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages \ pyecharts \ Commons \ utils py", line 3, the in & lt; module>
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 991, in _find_and_load
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 975, in _find_and_load_unlocked
The File "& lt; Frozen importlib. _bootstrap & gt;" , line 671, in _load_unlocked
The File "d: \ pycharmprojects \ venv \ lib \ site - packages \ PyInstaller \ loader \ pyimod03_importers py", line 623, in exec_module
Exec (the bytecode, the module __dict__)
The File "lib \ site - packages \ pyecharts \ datasets \ set py", line 93, in & lt; module>
No FileNotFoundError: [Errno 2] to a file or directory: 'C: \ \ Users \ \ ADMINI ~ 1 \ \ AppData \ \ Local \ \ Temp \ \ _MEI100042 \ \ pyecharts \ \ datasets \ \ map_filename json'
[12700] Failed to execute the script pyecha
CodePudding user response:
nullnull