因此,我有一个简单的代码块:
# Import library and create instance of REST client.
from Adafruit_IO import Client, Feed
aio = Client('aio_bleepbloop')
# Get list of feeds.
feeds = aio.feeds()
# Print out the feed names:
for f in feeds:
print('Feed: {0}'.format(f.name))
dataRoll = aio.receive('diceRoll').value
dataType = aio.receive('diceType').value
print(dataRoll, dataType)
在一台运行Python3.7.4的PC上运行jsut很好,并且可以运行—在我运行3.8.5的家用PC上,我发现以下错误:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-10-41fb818ed5ba> in <module>
1 # Import library and create instance of REST client.
2 from Adafruit_IO import Client, Feed
----> 3 aio = Client('aio_bleepbloop')
4
5 # Get list of feeds.
TypeError: __init__() missing 1 required positional argument: 'key'
我也不知道为什么
你可以试试
相关问题 更多 >
编程相关推荐