Skip to content
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

PhoneSim error: traceEnabled not defined #37

Open
mikeblum opened this issue Jul 18, 2015 · 1 comment
Open

PhoneSim error: traceEnabled not defined #37

mikeblum opened this issue Jul 18, 2015 · 1 comment

Comments

@mikeblum
Copy link

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?

@mikeblum
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant