Setting Exposure Time via Node Map

Hi, i managed to get it to work but i had to change the exposure time variable to a string and use the from_string function, i couldn’t get the value function to work. The code below works as intended though if anyone ever wants to use it

import os
import cvb


with cvb.DeviceFactory.open(os.path.join(cvb.install_path(), "drivers", "GenICam.vin"), port=0) as device:

#opens the camera
    
    stream = device.stream
    stream.start()

    #starts streaming

    device_node_map = device.node_maps["Device"]

    #calls the node map

    for i in range(10):
        exposure=(i+1)*10000
        val = str(exposure)

	#change exposure to a string and define variable

        device_node_map["ExposureTime"].from_string(val)

	#this changes the exposure time to whatever value val has        
    
        img, status = stream.wait()

	#waits till next image is ready and takes it        
     
        if status == cvb.WaitStatus.Ok:
            print("Acquired image: " + str(i))
        
        img.save("C:\\Users\\TechHP1\\Pictures\\newattempt" + str(i) + ".jpg")

        
    stream.stop()