Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Fix webui crash caused by deprecated config entry use. #909

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aleksas
Copy link

@aleksas aleksas commented Jul 17, 2019

Webui load error caused by deprecated use of domaincontroller

/usr/local/lib/python2.7/dist-packages/amqp/connection.py:292: AMQPDeprecationWarning: The .frame_writer attribute on the connection was accessed before
the connection was established.  This is supported for now, but will
be deprecated in amqp 2.2.0.

Since amqp 2.0 you have to explicitly call Connection.connect()
before using the connection.

  W_FORCE_CONNECT.format(attr=attr)))
Traceback (most recent call last):
  File "/usr/local/bin/pyspider", line 9, in <module>
    load_entry_point('pyspider==0.3.10', 'console_scripts', 'pyspider')()
  File "/usr/local/lib/python2.7/dist-packages/pyspider/run.py", line 754, in main
    cli()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyspider/run.py", line 384, in webui
    app.run(host=host, port=port)
  File "/usr/local/lib/python2.7/dist-packages/pyspider/webui/app.py", line 59, in run
    from .webdav import dav_app
  File "/usr/local/lib/python2.7/dist-packages/pyspider/webui/webdav.py", line 216, in <module>
    dav_app = WsgiDAVApp(config)
  File "/usr/local/lib/python2.7/dist-packages/wsgidav/wsgidav_app.py", line 135, in __init__
    _check_config(config)
  File "/usr/local/lib/python2.7/dist-packages/wsgidav/wsgidav_app.py", line 119, in _check_config
    raise ValueError("Invalid configuration:\n  - " + "\n  - ".join(errors))
ValueError: Invalid configuration:
  - Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead.

Fixed by replcing domaincontroller with http_authenticator.domain_controller.

@atanx
Copy link

atanx commented Aug 2, 2019

遇到同样的问题 python 3.6,
修改pyspider/webui/webdav.py 下的第209行,改成
'http_authenticator.domain_controller': NeedAuthController(app), 可以解决。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants