ZDM doesn't work on photon

Hey, I am using this example program to connect my device to the ZDM.
################################################################################

Zerynth Device Manager

Created by Zerynth Team 2020 CC

Authors: E.Neri, D.Neri

###############################################################################

from zdm import zdm
from wireless import wifi

Please uncomment the line related to the wi-fi chip architecture you are using

from microchip.winc1500 import winc1500 as wifi_driver

from espressif.esp32net import esp32wifi as wifi_driver

from broadcom.bcm43362 import bcm43362 as wifi_driver

import streams
import json

paste here your device id and password generated by the ZDM

the password is a jwt generated from a device’s key

device_id = ‘dev-4wbpyen81x6h’
password = ‘’

def pub_random():
# this function is called periodically to publish to ZDM random int value labeled with tags values
print(’------ publish random ------’)
tags = [‘tag1’, ‘tag2’, ‘tag3’]
payload = {
‘value’: 0
}

for t in tags:
    payload['value'] = random(0, 100)
    # publish payload to ZDM
    device.publish(json.dumps(payload), t)
    print('published on tag:', t, ':', payload)

print('pub_random done')

def pub_temp_pressure():
# this function publish another payload with two random int values
print(’---- publish temp_pressure ----’)
tag = ‘tag4’
temp = random(19, 23)
pressure = random(50, 60)
payload = {‘temp’: temp, ‘pressure’: pressure}
device.publish(json.dumps(payload), tag)
print('published on tag: ', tag, ‘:’, payload)

streams.serial()

try:
wifi_driver.auto_init()
for _ in range(5):
try:
print(“connect wifi”)
# Write here your wifi SSID and password
wifi.link(“Hannan-Wifi”, wifi.WIFI_WPA2, “”)
print(“connect wifi done”)
break
except Exception as e:
print(“wifi connect err”, e)

# create a ZDM Device instance with your device id
device = zdm.Device(device_id)
# set the device's password (jwt)
device.set_password(password)
# connect your device to ZDM enabling the device to receive incoming messages
device.connect()

while True:
    sleep(5000)
    pub_random()
    pub_temp_pressure()

except Exception as e:
print(“main”, e)

But every time I run it, I get this error.

Which takes me to error in line 394 In MQTT.py.
Can you please help me fix this.
Thanks.

Hey this is unrelated to your problem but did you have any issues loading the OS on the photon? I can register the device but not load the OS