TypeError: fetch() got an unexpected keyword argument 'now'
mohammadkashanzafar opened this issue · comments
Hi There Everyone,
I have installed graphite and am using it as database. I am using graphite-web, whisper, go-carbon and carbon-c-relay. After careful installation and configuration. The metrics get loading into the whisper storage and is visible on graphite webapp. But no graph is showing like in below picture. Instead when to open image in new tab or check logs this error is shown which is given below. I will be very grateful to anyone helping me in resolving this issue. Thanks in advance
graphite 1.1.10
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/graphite/webapp/graphite/errors.py", line 17, in new_f
return f(*args, **kwargs)
File "/opt/graphite/webapp/graphite/render/views.py", line 128, in renderView
data.extend(evaluateTarget(requestContext, targets))
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 19, in evaluateTarget
prefetchData(requestContext, pathExpressions)
File "/opt/graphite/webapp/graphite/render/datalib.py", line 268, in prefetchData
for result in STORE.fetch(pathExpressions, startTime, endTime, now, requestContext):
File "/opt/graphite/webapp/graphite/storage.py", line 188, in fetch
'fetch for %s' % str(patterns))
File "/opt/graphite/webapp/graphite/storage.py", line 133, in wait_jobs
raise Exception(message)
Exception: All requests failed for fetch for ['metrics.hostexample.host.serviceexample.perfdata.rta.value'] (1)
fetch for ['metrics.hostexample.host.serviceexample.perfdata.rta.value']: fetch() got an unexpected keyword argument 'now': Traceback (most recent call last):
File "/opt/graphite/webapp/graphite/node.py", line 30, in fetch
result = self.reader.fetch(startTime, endTime, now, requestContext)
File "/opt/graphite/webapp/graphite/readers/whisper.py", line 59, in fetch
data = self.fetch_data(startTime, endTime, now=now)
File "/opt/graphite/webapp/graphite/readers/whisper.py", line 55, in fetch_data
return whisper.fetch(self.fs_path, startTime, endTime, now=now)
TypeError: fetch() got an unexpected keyword argument 'now'
Looks likeyou installed somehow very old whisper package, I see now parameter was backported to 0.9.x releases in Dec 2013 - graphite-project/whisper@868a8b4
So, it's something very old, looks like v0.9.13
You should remove it and install whisper 1.1.x
Hello @deniszh
Hope you are doing well. I have upgraded my whisper version to v1.1.10. Please check below setup.py file. However I am still facing the same issue i don't get it.
whisper setup.py file (version part only)
setup(
name='whisper',
version='1.1.10',
url='http://graphiteapp.org/',
author='Chris Davis',
author_email='chrismd@gmail.com',
license='Apache Software License 2.0',
description='Fixed size round-robin style database',
long_description=read('README.md'),
long_description_content_type='text/markdown',
py_modules=['whisper'],
scripts=glob('bin/') + glob('contrib/'),
install_requires=['six'],
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
Your kind insight is requested please. I will be very thankful.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.