作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
<分区>
我正在尝试连接到 FTP 服务器以传输文件。这是我的代码;
import ftplib
ftp = ftplib.FTP()
host = host_name
port = 22
ftp.connect(host, port)
ftp.login(username, password)
但这是我得到的错误。有人可以帮我吗?非常感谢您的帮助。
EOFError Traceback(最后一次调用)
<ipython-input-2-094fa8cc7c63> in <module>()
3 host = host_name
4 port = 22
----> 5 ftp.connect(host, port)
6 ftp.login(username, password)
C:\Users\Ishwor.Bhatta\Anaconda3\lib\ftplib.py in connect(self, host, port, timeout, source_address)
154 self.af = self.sock.family
155 self.file = self.sock.makefile('r', encoding=self.encoding)
--> 156 self.welcome = self.getresp()
157 return self.welcome
158
C:\Users\Ishwor.Bhatta\Anaconda3\lib\ftplib.py in getresp(self)
233 # Raise various errors if the response indicates an error
234 def getresp(self):
--> 235 resp = self.getmultiline()
236 if self.debugging:
237 print('*resp*', self.sanitize(resp))
C:\Users\Ishwor.Bhatta\Anaconda3\lib\ftplib.py in getmultiline(self)
223 code = line[:3]
224 while 1:
--> 225 nextline = self.getline()
226 line = line + ('\n' + nextline)
227 if nextline[:3] == code and \
C:\Users\Ishwor.Bhatta\Anaconda3\lib\ftplib.py in getline(self)
207 print('*get*', self.sanitize(line))
208 if not line:
--> 209 raise EOFError
210 if line[-2:] == CRLF:
211 line = line[:-2]
EOFError:
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!