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: 'NoneType' object has no attribute 'loader' #194

Open
nan0kaiyu opened this Issue Apr 28, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@nan0kaiyu
Copy link

nan0kaiyu commented Apr 28, 2015

[19:~]$ pyspider
[I 150428 17:20:17 result_worker:49] result_worker starting...
[I 150428 17:20:17 scheduler:436] loading projects
[I 150428 17:20:17 processor:206] processor starting...
[I 150428 17:20:17 scheduler:377] in 5m: new:0,success:0,retry:0,failed:0
Exception in thread Thread-1:
Traceback (most recent call last):
File "", line 2195, in _find_and_load_unlocked
AttributeError: '_MovedItems' object has no attribute 'path'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/pyspider/scheduler/scheduler.py", line 469, in xmlrpc_run
from six.moves.xmlrpc_server import SimpleXMLRPCServer
ImportError: No module named 'six.moves.xmlrpc_server'; 'six.moves' is not a package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(_self._args, *_self._kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/scheduler/scheduler.py", line 471, in xmlrpc_run
from SimpleXMLRPCServer import SimpleXMLRPCServer
ImportError: No module named 'SimpleXMLRPCServer'

[I 150428 17:20:18 tornado_fetcher:427] fetcher starting...
Traceback (most recent call last):
File "/usr/local/bin/pyspider", line 9, in
load_entry_point('pyspider==0.3.4', 'console_scripts', 'pyspider')()
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 718, in main
cli()
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 664, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 971, in invoke
return Command.invoke(self, ctx)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 159, in cli
ctx.invoke(all)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 471, in all
ctx.invoke(webui, *_webui_config)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 306, in webui
app = load_cls(None, None, webui_instance)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 46, in load_cls
return utils.load_object(value)
File "/usr/local/lib/python3.4/dist-packages/pyspider/libs/utils.py", line 348, in load_object
module = import(module_name, globals(), locals(), [object_name])
File "/usr/local/lib/python3.4/dist-packages/pyspider/webui/init.py", line 8, in
from . import app, index, debug, task, result, login
File "/usr/local/lib/python3.4/dist-packages/pyspider/webui/app.py", line 80, in
template_folder=os.path.join(os.path.dirname(file), 'templates'))
File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 319, in init
template_folder=template_folder)
File "/usr/local/lib/python3.4/dist-packages/flask/helpers.py", line 741, in init
self.root_path = get_root_path(self.import_name)
File "/usr/local/lib/python3.4/dist-packages/flask/helpers.py", line 631, in get_root_path
loader = pkgutil.get_loader(import_name)
File "/usr/lib/python3.4/pkgutil.py", line 467, in get_loader
return find_loader(fullname)
File "/usr/lib/python3.4/pkgutil.py", line 488, in find_loader
return spec.loader
AttributeError: 'NoneType' object has no attribute 'loader'
[20:~]$ pyspider
[I 150428 17:21:23 result_worker:49] result_worker starting...
Exception in thread Thread-1:
Traceback (most recent call last):
File "", line 2195, in _find_and_load_unlocked
AttributeError: '_MovedItems' object has no attribute 'path'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/pyspider/scheduler/scheduler.py", line 469, in xmlrpc_run
from six.moves.xmlrpc_server import SimpleXMLRPCServer
ImportError: No module named 'six.moves.xmlrpc_server'; 'six.moves' is not a package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(_self._args, *_self._kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/scheduler/scheduler.py", line 471, in xmlrpc_run
from SimpleXMLRPCServer import SimpleXMLRPCServer
ImportError: No module named 'SimpleXMLRPCServer'

[I 150428 17:21:23 scheduler:436] loading projects
[I 150428 17:21:23 scheduler:377] in 5m: new:0,success:0,retry:0,failed:0
[I 150428 17:21:23 processor:206] processor starting...
[I 150428 17:21:23 tornado_fetcher:427] fetcher starting...
Traceback (most recent call last):
File "/usr/local/bin/pyspider", line 9, in
load_entry_point('pyspider==0.3.4', 'console_scripts', 'pyspider')()
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 718, in main
cli()
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 664, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 971, in invoke
return Command.invoke(self, ctx)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 159, in cli
ctx.invoke(all)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 471, in all
ctx.invoke(webui, *_webui_config)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 306, in webui
app = load_cls(None, None, webui_instance)
File "/usr/local/lib/python3.4/dist-packages/pyspider/run.py", line 46, in load_cls
return utils.load_object(value)
File "/usr/local/lib/python3.4/dist-packages/pyspider/libs/utils.py", line 348, in load_object
module = import(module_name, globals(), locals(), [object_name])
File "/usr/local/lib/python3.4/dist-packages/pyspider/webui/init.py", line 8, in
from . import app, index, debug, task, result, login
File "/usr/local/lib/python3.4/dist-packages/pyspider/webui/app.py", line 80, in
template_folder=os.path.join(os.path.dirname(file), 'templates'))
File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 319, in init
template_folder=template_folder)
File "/usr/local/lib/python3.4/dist-packages/flask/helpers.py", line 741, in init
self.root_path = get_root_path(self.import_name)
File "/usr/local/lib/python3.4/dist-packages/flask/helpers.py", line 631, in get_root_path
loader = pkgutil.get_loader(import_name)
File "/usr/lib/python3.4/pkgutil.py", line 467, in get_loader
return find_loader(fullname)
File "/usr/lib/python3.4/pkgutil.py", line 488, in find_loader
return spec.loader
AttributeError: 'NoneType' object has no attribute 'loader'

@binux

This comment has been minimized.

Copy link
Owner

binux commented Apr 30, 2015

Try upgrade the package six to latest version.

@synsun

This comment has been minimized.

Copy link

synsun commented May 3, 2015

@nan0kaiyu

This comment has been minimized.

Copy link

nan0kaiyu commented May 5, 2015

uninstall python3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment