Short version:

Error message: AttributeError("'module' object has no attribute 'epolls'",)

Possible explanation:

https://github.com/shazow/urllib3/issues/1104  where urllib3 is intercepting
select calls, and not providing epoll or epolls.

Question:

How to bypass this?  My script worked a few months ago when testing, so I am
trying to narrow down what changed.

Code in monotonic.py, I changed to get some debugging output (exception
occurs on the statement between 'line d' and 'line g', following code is
starting around line 132 in montonic.py:

        else:
            print "line b"
            print sys.path
            print ctypes
            print ctypes.util
            try:
                print "line d"
                print ctypes.util.find_library('c')
                print "line g"
                clock_gettime = ctypes.CDLL(ctypes.util.find_library('c'),
                                            use_errno=True).clock_gettime
            except AttributeError as e:
                print( "line e ", e )
                clock_gettime = ctypes.CDLL(ctypes.util.find_library('rt'),
                                            use_errno=True).clock_gettime
                print "line f"

search for 'line e' in the following output to spot the module with
problems.

root@edge:/home/vagrant# ryu run --observe-links /vagrant/test1.py
--install-lldp-flow
loading app /vagrant/test1.py
loading app ryu.topology.switches
loading app ryu.controller.dpset
loading app ryu.controller.ofp_handler
instantiating app ryu.controller.dpset of DPSet
instantiating app ryu.topology.switches of Switches
line a
line b
['/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl',
'/usr/share/python-wheels/appdirs-1.4.0-py2.py3-none-any.whl',
'/usr/share/python-wheels/chardet-2.3.0-py2.py3-none-any.whl',
'/usr/share/python-wheels/colorama-0.3.7-py2.py3-none-any.whl',
'/usr/share/python-wheels/distlib-0.2.4-py2.py3-none-any.whl',
'/usr/share/python-wheels/distro-1.0.1-py2.py3-none-any.whl',
'/usr/share/python-wheels/html5lib-0.999999999-py2.py3-none-any.whl',
'/usr/share/python-wheels/ipaddress-0.0.0-py2.py3-none-any.whl',
'/usr/share/python-wheels/lockfile-0.12.2-py2.py3-none-any.whl',
'/usr/share/python-wheels/packaging-16.8-py2.py3-none-any.whl',
'/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl',
'/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl',
'/usr/share/python-wheels/progress-1.2-py2.py3-none-any.whl',
'/usr/share/python-wheels/pyparsing-2.1.10-py2.py3-none-any.whl',
'/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl',
'/usr/share/python-wheels/retrying-1.3.3-py2.py3-none-any.whl',
'/usr/share/python-wheels/setuptools-32.3.1-py2.py3-none-any.whl',
'/usr/share/python-wheels/six-1.10.0-py2.py3-none-any.whl',
'/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl',
'/usr/share/python-wheels/webencodings-0.5-py2.py3-none-any.whl',
'/usr/share/python-wheels/wheel-0.29.0-py2.py3-none-any.whl',
'/usr/local/bin', '/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages']
<module 'ctypes' from '/usr/lib/python2.7/ctypes/__init__.pyc'>
<module 'ctypes.util' from '/usr/lib/python2.7/ctypes/util.pyc'>
line d
('line e ', AttributeError("'module' object has no attribute 'epolls'",))
Exception AttributeError: "'_SocketDuckForFd' object has no attribute
'_closed'" in <bound method _SocketDuckForFd.__del__ of _SocketDuckForFd:7>
ignored
Exception AttributeError: "'_SocketDuckForFd' object has no attribute
'_closed'" in <bound method _SocketDuckForFd.__del__ of _SocketDuckForFd:8>
ignored
Traceback (most recent call last):
  File "/usr/local/bin/ryu", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/ryu/cmd/ryu_base.py", line
74, in main
    subcmd.run(base_conf.subcommand_args)
  File "/usr/local/lib/python2.7/dist-packages/ryu/cmd/ryu_base.py", line
57, in run
    self.entry(args=args, prog=prog)
  File "/usr/local/lib/python2.7/dist-packages/ryu/cmd/manager.py", line 81,
in main
    services.extend(app_mgr.instantiate_apps(**contexts))
  File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py",
line 509, in instantiate_apps
    self._instantiate(app_name, cls, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py",
line 495, in _instantiate
    app = cls(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ryu/topology/switches.py",
line 532, in __init__
    self.threads.append(hub.spawn(self.lldp_loop))
  File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 68, in
spawn
    return eventlet.spawn(_launch, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py",
line 50, in spawn
    hub = hubs.get_hub()
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/__init__.py",
line 116, in get_hub
    use_hub()
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/__init__.py",
line 70, in use_hub
    mod = get_default_hub()
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/__init__.py",
line 38, in get_default_hub
    import eventlet.hubs.epolls
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/epolls.py",
line 27, in <module>
    from eventlet.hubs.hub import BaseHub
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line
23, in <module>
    from eventlet.support import greenlets as greenlet, clear_sys_exc_info,
monotonic, six
  File
"/usr/local/lib/python2.7/dist-packages/eventlet/support/monotonic.py", line
178, in <module>
    raise RuntimeError('no suitable implementation for this system')
RuntimeError: no suitable implementation for this system



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to