我试图让这个:http ://blog.datasingularity.com/?p=148 工作。我已经走了很远,但我碰壁了,尤其是对于像我一样不擅长编程的人。
我收到此错误:
C:\windows\system32>python C:\Users\Jenna\Downloads\arduinoIRC\Main.py
Traceback (most recent call last):
File "C:\Users\Jenna\Downloads\arduinoIRC\Main.py", line 28, in <module>
main()
File "C:\Users\Jenna\Downloads\arduinoIRC\Main.py", line 25, in main
bot.start()
File "C:\Python27\lib\ircbot.py", line 246, in start
self._connect()
File "C:\Python27\lib\ircbot.py", line 96, in _connect
ircname=self._realname)
File "C:\Python27\lib\irclib.py", line 1084, in connect
localaddress, localport, ssl, ipv6)
File "C:\Python27\lib\irclib.py", line 433, in connect
self.socket.connect((self.server, self.port))
File "C:\Python27\lib\socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
TypeError: an integer is required
主文件
import Commands
from ArduinoBot import *
from Arduinos import Arduino
def main():
bot = ArduinoBot(Arduino(Commands.PORT, Commands.BAUD), Commands.CHANNEL, Commands.NICK, Commands.SERVER, Commands.PORT)
bot.start()
if __name__ == "__main__":
main()