0

我试图让这个: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()

命令 .py http://pastebin.com/kH7w9Mt3

4

1 回答 1

0

可以发一下内容吗Commands.py

看起来你给它一个字符串,它期待一个 int。

于 2013-02-15T15:38:50.900 回答