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

Latest version shows errors on build #3451

Closed
devilgate opened this issue Aug 24, 2020 · 2 comments
Closed

Latest version shows errors on build #3451

devilgate opened this issue Aug 24, 2020 · 2 comments
Labels

Comments

@devilgate
Copy link
Contributor

Environment

Python Version:

3.7.8

Nikola Version:

8.1.1

Operating System:

MacOS Catalina (10.15.6)

Description:

I just pulled from upstream and got the latest version, and now when I run nikola build I get the following errors. Everything seems to build OK, but something's obviously not right.

$ nikola build
[2020-08-24 17:53:38] ERROR: yapsy: Unable to import plugin: /Users/martin/Projects/nikola/nikola/plugins/command/auto
Traceback (most recent call last):
  File "/Users/martin/.venv/nikola-dev/lib/python3.7/site-packages/yapsy/PluginManager.py", line 518, in loadPlugins
    candidate_module = PluginManager._importModule(plugin_module_name, candidate_filepath)
  File "/Users/martin/.venv/nikola-dev/lib/python3.7/site-packages/yapsy/PluginManager.py", line 581, in _importModule
    candidate_module = imp.load_module(plugin_module_name,None,candidate_filepath,("py","r",imp.PKG_DIRECTORY))
  File "/usr/local/Cellar/python/3.7.8/Frameworks/Python.framework/Versions/3.7/lib/python3.7/imp.py", line 244, in load_module
    return load_package(name, filename)
  File "/usr/local/Cellar/python/3.7.8/Frameworks/Python.framework/Versions/3.7/lib/python3.7/imp.py", line 216, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/martin/Projects/nikola/nikola/plugins/command/auto/__init__.py", line 479, in <module>
    class IndexHtmlStaticResource(StaticResource):
  File "/Users/martin/Projects/nikola/nikola/plugins/command/auto/__init__.py", line 491, in IndexHtmlStaticResource
    async def _handle(self, request: web.Request) -> web.Response:
AttributeError: 'NoneType' object has no attribute 'Request'
@Kwpolska
Copy link
Member

This is a bug with loading nikola auto, because the type annotations reference the aiohttp.web module, which is missing on your system. The only consequence of it is that nikola auto would show this cryptic error, instead of a request to install aiohttp and watchdog. You can easily patch the two lines where this problem happens.

(It will also fix itself in Python 3.10, where all annotations will be late-evaluated.)

@devilgate
Copy link
Contributor Author

Thanks. Probably worth mentioning, then, for anyone else who has the problem, that pip install aiohttp is how to fix it.

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

No branches or pull requests

2 participants