I get this error when creating a new Pebble project
shatekar-mbp:workspace SagarHatekar$ pebble new-project hello-world
[DEBUG ] [Analytics] header: {'User-Agent': 'Pebble SDK/2.0.0 (Darwin-13.0.0-x86_64-i386-64bit-python-2.7.3)'}, data: {'ck': '2.7.3', 'cn': 'Darwin-13.0.0-x86_64-i386-64bit', 'cid': 'ac9248aa-9366-4714-a965-0d2a4903349e', 'tid': 'UA-30638158-7', 't': 'event', 'v': 1, 'cs': 'ac9248aa-9366-4714-a965-0d2a4903349e'}
category: install
action: import
label: fail: missing import: name 'ABNF' is not defined
value: 0
Traceback (most recent call last):
File "/Users/SagarHatekar/dev/pebble/sdk/bin/../tools/pebble.py", line 20, in
from pebble.PblBuildCommand import (PblBuildCommand,
File "/Users/SagarHatekar/dev/pebble/sdk/tools/pebble/PblBuildCommand.py", line 12, in
from LibPebblesCommand import (NoCompilerException, BuildErrorException,
File "/Users/SagarHatekar/dev/pebble/sdk/tools/pebble/LibPebblesCommand.py", line 7, in
import pebble as libpebble
File "/Users/SagarHatekar/dev/pebble/sdk/tools/pebble/pebble.py", line 21, in
import WebSocketPebble
File "/Users/SagarHatekar/dev/pebble/sdk/tools/pebble/WebSocketPebble.py", line 21, in
class WebSocketPebble(WebSocket):
File "/Users/SagarHatekar/dev/pebble/sdk/tools/pebble/WebSocketPebble.py", line 25, in WebSocketPebble
def write(self, payload, opcode = ABNF.OPCODE_BINARY, ws_cmd = WS_CMD_PHONE_TO_WATCH):
NameError: name 'ABNF' is not defined
Any help is appreciated.
The problem is with your websocket and websocket-client.
Uninstall websocket
and websocket-client
, and reinstall using the pip requirements.txt
pip uninstall websocket websocket-client
pip install -r PebbleSDK-2.0-BETA2/requirements.txt