[warning] There are 1 missing symbols! This VM does not support the requested features! ['socket_api_pointers']

Hey,
I am getting this error.
[warning] There are 1 missing symbols! This VM does not support the requested features! [‘socket_api_pointers’]

hi @Asmer_Hamid_Ali
Could you post the code you’re compiling? so we can duplicate this and check it.

Thanks.

Here is the code:

import streams
import json

from espressif.esp8266wifi import esp8266wifi as wifi_driver

from wireless import wifi
from lwmqtt import mqtt

def hello_samples(client, payload):
print(’> received: ', payload)

def connection_subscribe(client):
# subscribe after connection to that even after re-connection subscription are renewed
client.subscribe(“zerynth/samples”, hello_samples)

def loop_failure(client):
# called when packet handle loop fails
# the user can implement reconnection logic (e.g. exponential backoff) here
while True:
try:
print("> reconnecting…")
client.reconnect()
break
except Exception as e:
print(e)
sleep(1000)
return mqtt.RECOVERED

streams.serial()

wifi_driver.auto_init(ext=1)

print(’> wifi link’)
wifi.link(“xyz”,wifi.WIFI_WPA2,“xyz”)
print(’> linked’)

client = mqtt.Client(“zerynth-mqtt”)

connect to “test.mosquitto.org

for retry in range(10):
try:
print(“connect”)
client.connect(“test.mosquitto.org”, 60, aconnect_cb=connection_subscribe, loop_failure=loop_failure)
break
except Exception as e:
print(“connecting…”)
else:
print("> connection failed!")
raise IOError
print("> connected.")

subscribe to channels

client.subscribe(“zerynth/samples”, hello_samples)

while True:
if client.connected():
print("> publish.")
client.publish(“zerynth/samples”, json.dumps({‘rand’: random(0,10)}))
sleep(1000)

could you post the code idented or post the main python file. so I can test it.

Hey, @karimhamdy1
Thank you for your help.
Actually I was testing the MQTT program.
What I intended to do is, I want to subscribe to a topic “house/bulb” and to receive the payload.
I am using HiveQ as the broker and I am using VsCode to publish payload to the topic.
But unfortunately, whenever I try to uplink the zerynth code to my NodeMCU esp8266, I get a warning and an error. They are given below:
[warning] There are 1 missing symbols! This VM does not support the requested features! [‘socket_api_pointers’]

[error] Check if the device is virtualized with the last available version-patch of the virtual machine

I have tried virtualizing esp8266 multiple times but I still get the same result.
Please help!

import streams
import json

from espressif.esp8266wifi import esp8266wifi as wifi_driver

from wireless import wifi
from lwmqtt import mqtt

def hello_samples(client, payload):
    print('> received: ', payload)

def connection_subscribe(client):
    # subscribe after connection to that even after re-connection subscription are renewed
    client.subscribe("house/bulb", hello_samples)

def loop_failure(client):
    # called when packet handle loop fails
    # the user can implement reconnection logic (e.g. exponential backoff) here
    while True:
        try:
            print("> reconnecting...")
            client.reconnect()
            break
        except Exception as e:
            print(e)
        sleep(1000)
    return mqtt.RECOVERED

streams.serial()

wifi_driver.auto_init(ext=1)

print('> wifi link')
wifi.link("xyz",wifi.WIFI_WPA2,"xyz")
print('> linked')

client = mqtt.Client("127.0.0.1")

for retry in range(10):
    try:
        print("connect")
        client.connect("127.0.0.1", 1883, 60)
        break
    except Exception as e:
        print("connecting...")
else:
    print("> connection failed!")
    raise IOError
print("> connected.")
# subscribe to channels
client.subscribe("house/bulbs", hello_samples)

while True:
    if client.connected():
        print("> publish.")
        client.publish("zerynth/samples", json.dumps({'rand': random(0,10)}))
    sleep(1000)

hi @Asmer_Hamid_Ali
Unfortuantely, the ESP8266 micro-controller is depreciated and no longer supported by espressif and Zerynth, the documentation helps maintaining existing projects.
ESP32 are better supported by espressif and Zerynth.
I recommend you use the ESP32 boards and the code will be nearly identical, just change the wifi driver.

@karimhamdy1 Thank you for the help!