Skip to content
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

AttributeError: 'module' object has no attribute 'Controller' #564

Open
niralatuladhar opened this issue Feb 17, 2021 · 2 comments
Open

Comments

@niralatuladhar
Copy link

Getting this error while starting the newrelic-plugin-agent. What could you possible reason?

newrelic-plugin-agent -c /etc/newrelic/newrelic-plugin-agent.cfg -f
Traceback (most recent call last):
  File "/usr/bin/newrelic-plugin-agent", line 9, in <module>
    load_entry_point('newrelic-plugin-agent==1.3.0', 'console_scripts', 'newrelic-plugin-agent')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/newrelic_plugin_agent/agent.py", line 23, in <module>
    class NewRelicPluginAgent(helper.Controller):
AttributeError: 'module' object has no attribute 'Controller'
@t49tran
Copy link

t49tran commented Mar 3, 2021

It's because of the recent release of helper on 2nd February. I have made a PR and hopefully the library owner will merge it.

Otherwise the solution is to fork this repo and lock the helper package version in setup.py.

@lnapolillo
Copy link

lnapolillo commented Jun 16, 2021

Another workaround I've found was to reinstall and tell pip which version of helper to download with the -c option:
pip install -c constraints.txt newrelic-plugin-agent

Where constraints.txt is a file that contains this line:

helper==2.4.2

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

3 participants