Dashboard
Dashboard copied to clipboard
ModuleNotFoundError
When i run the "python run.py", i got the error as fllow.
ModuleNotFoundError: No module named 'example.commons'
It's because of the different version of PyEcharts.
You can change the code from example.commons import Faker
in help_funcs.py
to from pyecharts.faker import Faker
.
i changed it, but i got another error.
Traceback (most recent call last):
File "run.py", line 36, in <module>
count_user_D_graph = line_counter(df)
File "/home/hichens/GitProject/Dashboard/help_funcs.py", line 109, in line_counter
series = df.set_index('date_joined').resample(freq).apply(count_users).cumsum()
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/resample.py", line 285, in aggregate
result = self._groupby_and_aggregate(how, grouper, *args, **kwargs)
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/resample.py", line 359, in _groupby_and_aggregate
result = grouped._aggregate_item_by_item(how, *args, **kwargs)
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 1162, in _aggregate_item_by_item
result[item] = colg.aggregate(func, *args, **kwargs)
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 265, in aggregate
return self._python_agg_general(func, *args, **kwargs)
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 927, in _python_agg_general
result, counts = self.grouper.agg_series(obj, f)
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/ops.py", line 863, in agg_series
return grouper.get_result()
File "pandas/_libs/reduction.pyx", line 284, in pandas._libs.reduction.SeriesBinGrouper.get_result
File "pandas/_libs/reduction.pyx", line 195, in pandas._libs.reduction._BaseGrouper._apply_to_group
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 914, in <lambda>
f = lambda x: func(x, *args, **kwargs)
File "/home/hichens/GitProject/Dashboard/help_funcs.py", line 93, in count_users
subscribers = df.query('is_filled==1').shape[0]
File "/home/hichens/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py", line 5274, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'Series' object has no attribute 'query'
Same error here. Can we get the requirements.txt for different pacakge version?
请问pyecharts的版本是?