Skip to content

Support Python 3 #7

@PanderMusubi

Description

@PanderMusubi

Please support Python 3

What needs changing is

-    client_identifier = hashlib.md5("ph-%s" % socket.getfqdn()).hexdigest()
+    client_identifier = hashlib.md5(("ph-%s" % socket.getfqdn()).encode('utf-8')).hexdigest()

and

-        print red, green, blue
+        print('%s %s %s' % (red, green, blue))

Furthermore, I get

INFO:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.9
DEBUG:urllib3.connectionpool:"GET /api/0cc11252a92919daa1dc118aeb84d6e9 HTTP/1.1" 200 None
DEBUG:hue:<Response [200]>
DEBUG:hue:b'[{"error":{"type":1,"address":"/","description":"unauthorized user"}}]'

How can I fix that?

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