Skip to content

PhoneSim error: traceEnabled not defined #37

Open

Description

@mikeblum

Here's the stacktrace:

[DEBUG   ] "POST /td.pebble.sdk_events HTTP/1.1" 200 0
[ERROR   ] global name 'traceEnabled' is not defined
Traceback (most recent call last):
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/bin/../tools/pebble.py", line 165, in <module>
    sys.exit(main())
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/bin/../tools/pebble.py", line 159, in main
    retval = PbSDKShell().main()
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/bin/../tools/pebble.py", line 96, in main
    return self.run_action(args.command, args)
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/bin/../tools/pebble.py", line 104, in run_action
    retval = command.run(args)
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/tools/pebble/LibPebblesCommand.py", line 174, in run
    LibPebbleCommand.run(self, args)
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/tools/pebble/LibPebblesCommand.py", line 110, in run
    self.pebble.set_time_utc(int(time.time()))
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/tools/pebblecomm/pebble.py", line 1031, in set_time_utc
    self._send_message("TIME", data)
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/tools/pebblecomm/pebble.py", line 836, in _send_message
    self._ser.write(msg)
  File "/Users/mblum/Developer/pebble-dev/PebbleSDK-3.1/tools/pebblecomm/WebSocketPebble.py", line 53, in write
    if traceEnabled:
NameError: global name 'traceEnabled' is not defined

My env:
OS: Mac OS X Yosemite 10.10.4
Python 2.7.10 (default, Jul 13 2015, 12:05:58)

It looks like the issue is with the version of websocket-client in the requirements.txt in Pebble 3.1

websocket-client==0.22.0

I updated the requirements.txt to 0.32.0.

but it looks like lilpebble went out of sync with the python websockets-client library.

Any ideas?

Activity

  1. mikeblum commented on Jul 18, 2015

    @mikeblum
    Author

    I patched it by adding in the traceEnabled global here:

    vi +52 Pebble/common/phonesim/libpebble/pebblecomm/WebSocketPebble.py

    and here:

    vi +53 tools/pebblecomm/WebSocketPebble.py

    and adding this at line ~27 to both files:

    global traceEnabled
    traceEnabled = True

    and that gets the emulator running again. Should I make a PR or should we get in sync with the websockets-client project? They use _traceEnabled apparently.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions