DHT Sensor With CircuitPython

Hi,
Thanks for adding me to the group. This is my first post here.

I am trying to find a CircuitPython code for the DHT1 sensor.
The only one I can find is from Adafruit and it doesn’t work.
The code has a line dht = adafruit_dht.DHT11(board.D2)

The error says “Module object has no attribute D2” . I have tried other pins but get the same error.
Does anyone have a working CircuitPython code please.

There is too little information available at the moment for us to judge.
Can you tell us the list of hardware used in the project: SKU code or hardware name, and take a complete picture of the device and connection, we need to determine the hardware environment of your project.