greenhost / certbot-haproxy

HAProxy plugin for Let's Encrypt's Certbot
Other
126 stars 21 forks source link

Error running 'cannot import standalone' #26

Open DaNeubi opened 4 years ago

DaNeubi commented 4 years ago

Hey,

I've been following your tutorial but if I want to execute the certbot I get the following error:

2020-05-23 20:42:10,004:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/certbot/main.py", line 15, in main
    return internal_main.main(cli_args)
  File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/main.py", line 1317, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/plugins/disco.py", line 207, in find_all
    plugin_ep = PluginEntryPoint(entry_point)
  File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/plugins/disco.py", line 54, in __init__
    self.plugin_cls = entry_point.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/certbot_haproxy/authenticator.py", line 55, in <module>
    from certbot.plugins import standalone
ImportError: cannot import name standalone
2020-05-23 20:42:10,004:ERROR:certbot._internal.log:An unexpected error occurred:

I'm running Debian 10, latest updates, Pyhton 2.7.16, Certbot 0.8.1

What am I doing wrong?

Thanks ahead.

SnijderC commented 4 years ago

Hey,

I've been following your tutorial but if I want to execute the certbot I get the following error:

2020-05-23 20:42:10,004:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/certbot/main.py", line 15, in main
    return internal_main.main(cli_args)
  File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/main.py", line 1317, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/plugins/disco.py", line 207, in find_all
    plugin_ep = PluginEntryPoint(entry_point)
  File "/usr/local/lib/python2.7/dist-packages/certbot/_internal/plugins/disco.py", line 54, in __init__
    self.plugin_cls = entry_point.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/certbot_haproxy/authenticator.py", line 55, in <module>
    from certbot.plugins import standalone
ImportError: cannot import name standalone
2020-05-23 20:42:10,004:ERROR:certbot._internal.log:An unexpected error occurred:

I'm running Debian 10, latest updates, Pyhton 2.7.16, Certbot 0.8.1

What am I doing wrong?

Thanks ahead.

Hi,

I'm afraid cerbot has removed a module that we rely on for the plugin to work, which explains the error: ImportError: cannot import name standalone. I think that it was removed in a more recent version than 0.8.1, are you sure you aren't running a 1.x.x version?

That said, this plugin is dated and needs an update, but I'm not sure if that will happen any time soon.

SnijderC commented 4 years ago

A newer version was pushed earlier this morning that might work for you, however it requires you to substantially change the way you install certificates. Please read Dropped installer support in version 0.2.0+.

Long term we will need to make more changes to certbot, which are not yet planned to be made as of yet.