[closed] Micropython Jquery confusion.



  • I'm trying to run the following code but I seam to be missing something.

    from m5stack import *
    from m5stack_ui import *
    from uiflow import *
    
    screen = M5Screen()
    screen.clean_screen()
    screen.set_screen_bg_color(0xFFFFFF)
    
    image0 = M5Img("res/default.png", x=3, y=91, parent=None)
    
    import urequests
    r = urequests.get('https://community.m5stack.com/api/user/ajb2k3')
    r_dict = r.json()
    image0.set_network_img_src(((str('https;//community.m5stack.com') + (r_dict['picture']))))
    

    Nevermind I solved it with

    from m5stack import *
    from m5stack_ui import *
    from uiflow import *
    
    screen = M5Screen()
    screen.clean_screen()
    screen.set_screen_bg_color(0xFFFFFF)
    
    
    imgrespons = None
    
    
    
    image0 = M5Img("res/default.png", x=3, y=91, parent=None)
    label0 = M5Label('Text', x=35, y=41, color=0x000, font=FONT_MONT_14, parent=None)
    
    
    
    
    import urequests
    r = urequests.get('https://community.m5stack.com/api/user/ajb2k3')
    r_dict = r.json()
    imgrespons = ('https://community.m5stack.com' + r_dict['picture'])
    
    
    label0.set_text(str(imgrespons))
    image0.set_network_img_src(imgrespons)