Skip to content

No module named websocket #27

@elcreator

Description

@elcreator

I'm trying to fresh install this on Raspbian but lack of websocket module prevents from successful execution. I have tried troubleshoot this by installing websocket-related things modules but it was not helpful.

pip install websocket-client
Requirement already satisfied: websocket-client in /usr/local/lib/python2.7/dist-packages (0.51.0)

pi@raspberrypi:~/ws $ pip install websocket
Requirement already satisfied: websocket in /usr/local/lib/python2.7/dist-packages (0.2.1)
Requirement already satisfied: greenlet in /usr/local/lib/python2.7/dist-packages (from websocket) (0.4.14)
Requirement already satisfied: gevent in /usr/local/lib/python2.7/dist-packages (from websocket) (1.3.6)

pi@raspberrypi:~/ws $ twistd smartanthill
An error has occurred: b'ImportError: No module named websocket'
Please look at log file for more information.
pi@raspberrypi:~/ws $ smartanthill
2018-09-01T02:51:38+0300 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 18.7.0 (/usr/bin/python 2.7.13) starting up.
2018-09-01T02:51:38+0300 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
2018-09-01T02:51:38+0300 [sas]
              _________________________________________
             /                                        /\     >< An open IoT system ><
            /        \/             \\             __/ /\    Home:    http://smartanthill.org
           /   ___  _@@    Smart    @@_  ___     /  \/       Docs:    http://docs.smartanthill.org
          /   (___)(_)    Anthill    (_)(___)   /__          Issues:  https://github.com/smartanthill/smartanthill2_0/issues
         /    //|| ||      0.0.0      || ||\\     /\         License: Copyright (c) 2015, OLogN Technologies AG, GNU GPL v2.0
        /_______________________________________/ /
        \_______________________________________\/           Workspace: /home/pi/ws
         \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \           Dashboard: http://localhost:8138/

2018-09-01T02:51:39+0300 [litemq] Service has been started with options '{u'resend_max': 10, u'resend_delay': 1}'
2018-09-01T02:51:39+0300 [device] Service has been started with options '{}'
2018-09-01T02:51:39+0300 [litemq] Declared new exchange 'network' with type 'direct'
2018-09-01T02:51:39+0300 [litemq] Registered consumer with exchange=network, queue=control.in, routing_key=transport->control, ack=False
2018-09-01T02:51:39+0300 [litemq] Registered consumer with exchange=network, queue=control.out, routing_key=client->control, ack=False
2018-09-01T02:51:39+0300 [network.control] Service has been started with options 'None'
2018-09-01T02:51:39+0300 [litemq] Registered consumer with exchange=network, queue=transport.in, routing_key=routing->transport, ack=False
2018-09-01T02:51:39+0300 [litemq] Registered consumer with exchange=network, queue=transport.out, routing_key=control->transport, ack=True
2018-09-01T02:51:39+0300 [network.transport] Service has been started with options 'None'
2018-09-01T02:51:39+0300 [network] Service has been started with options '{}'
2018-09-01T02:51:39+0300 [api] Auto-loaded 'GET:device.ping' handler
2018-09-01T02:51:39+0300 [api] Auto-loaded 'GET:device.operations' handler
2018-09-01T02:51:39+0300 [api] Auto-loaded 'UPDATE:device.pinmode' handler
2018-09-01T02:51:39+0300 [api] Auto-loaded 'GET:device.digitalpin' handler
2018-09-01T02:51:39+0300 [api] Auto-loaded 'UPDATE:device.digitalpin' handler
2018-09-01T02:51:39+0300 [api] Auto-loaded 'UPDATE:device.analogreference' handler
2018-09-01T02:51:39+0300 [api] Auto-loaded 'GET:device.analogpin' handler
2018-09-01T02:51:39+0300 [api] Auto-loaded 'UPDATE:device.analogpin' handler
2018-09-01T02:51:39+0300 [stderr#error] Traceback (most recent call last):
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/bin/smartanthill", line 11, in <module>
2018-09-01T02:51:39+0300 [stderr#error]     sys.exit(main())
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/smartanthill/__main__.py", line 33, in main
2018-09-01T02:51:39+0300 [stderr#error]     twistd.run()
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 31, in run
2018-09-01T02:51:39+0300 [stderr#error]     app.run(runApp, ServerOptions)
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 674, in run
2018-09-01T02:51:39+0300 [stderr#error]     runApp(config)
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 25, in runApp
2018-09-01T02:51:39+0300 [stderr#error]     runner.run()
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 385, in run
2018-09-01T02:51:39+0300 [stderr#error]     self.postApplication()
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line 254, in postApplication
2018-09-01T02:51:39+0300 [stderr#error]     self.startApplication(self.application)
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/scripts/_twistd_unix.py", line 453, in startApplication
2018-09-01T02:51:39+0300 [stderr#error]     app.startApplication(application, not self.config['no_save'])
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 690, in startApplication
2018-09-01T02:51:39+0300 [stderr#error]     service.IService(application).startService()
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/application/service.py", line 288, in startService
2018-09-01T02:51:39+0300 [stderr#error]     service.startService()
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/smartanthill/service.py", line 94, in startService
2018-09-01T02:51:39+0300 [stderr#error]     SAMultiService.startService(self)
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/smartanthill/service.py", line 50, in startService
2018-09-01T02:51:39+0300 [stderr#error]     MultiService.startService(self)
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/application/service.py", line 288, in startService
2018-09-01T02:51:39+0300 [stderr#error]     service.startService()
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/smartanthill/api/service.py", line 48, in startService
2018-09-01T02:51:39+0300 [stderr#error]     service = namedModule(path).makeService("api.%s" % _name, _options)
2018-09-01T02:51:39+0300 [stderr#error]   File "/usr/local/lib/python2.7/dist-packages/twisted/python/reflect.py", line 159, in namedModule
2018-09-01T02:51:39+0300 [stderr#error]     topLevel = __import__(name)
2018-09-01T02:51:39+0300 [stderr#error] ImportError: No module named websocket

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions