Dashboard icon indicating copy to clipboard operation
Dashboard copied to clipboard

ModuleNotFoundError

Open hehichens opened this issue 4 years ago • 4 comments

When i run the "python run.py", i got the error as fllow.

ModuleNotFoundError: No module named 'example.commons'

hehichens avatar Jul 20 '20 06:07 hehichens

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.

CapAllen avatar Jul 22 '20 02:07 CapAllen

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'

hehichens avatar Jul 22 '20 08:07 hehichens

Same error here. Can we get the requirements.txt for different pacakge version?

Jiannan28 avatar Aug 07 '20 16:08 Jiannan28

请问pyecharts的版本是?

lvjiuluan avatar Dec 15 '20 02:12 lvjiuluan