Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102911
| Path | csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Stephane Wirtel <stephane@wirtel.be> |
| Newsgroups | comp.lang.python |
| Subject | Re: ftplib throws: IndexError: tuple index out of range |
| Date | Sun, 14 Feb 2016 12:00:16 +0100 |
| Lines | 143 |
| Message-ID | <mailman.106.1455447626.22075.python-list@python.org> (permalink) |
| References | <56C05CEF.5080304@rece.vub.ac.be> |
| Reply-To | stephane@wirtel.be |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de q1htD5p2PUn+grnqAxGPcwrF9UL5c4krSbqubMJeBrBQ== |
| Return-Path | <stephane@wirtel.be> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.03; 'resp': 0.07; 'true)': 0.07; 'cc:addr:python-list': 0.09; '__init__': 0.09; 'aborted': 0.09; 'cmd': 0.09; 'e.args[0]': 0.09; 'ftplib': 0.09; 'mode,': 0.09; 'tuple': 0.09; 'index': 0.13; "skip:' 30": 0.15; "'b'": 0.16; '170,': 0.16; '201': 0.16; '478': 0.16; '@matrixise': 0.16; 'cmd,': 0.16; 'conn': 0.16; 'conn,': 0.16; 'eintr': 0.16; 'eintr,': 0.16; 'eintr:': 0.16; 'frame,': 0.16; 'from:addr:stephane': 0.16; 'from:addr:wirtel.be': 0.16; 'innermost': 0.16; 'received:io': 0.16; 'received:mx1.wirtel.be': 0.16; 'received:psf.io': 0.16; 'received:wirtel.be': 0.16; 'rest)': 0.16; 'socket.py': 0.16; 'st\xc3\xa9phane': 0.16; 'url:linux': 0.16; 'url:wirtel': 0.16; 'wirtel': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'skip:" 30': 0.20; 'skip:" 40': 0.20; '%s"': 0.22; 'cc:no real name:2**0': 0.22; '(most': 0.24; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'rest': 0.26; 'error': 0.27; 'entries': 0.27; 'host': 0.28; "skip:' 10": 0.28; 'readline': 0.29; 'skip:/ 40': 0.29; 'starts': 0.29; 'program,': 0.29; 'url:mailman': 0.30; 'received:be': 0.30; 'entry': 0.31; 'skip:s 30': 0.31; 'anyone': 0.32; 'problem': 0.33; 'url:python': 0.33; 'skip:/ 20': 0.33; 'open': 0.33; 'url:listinfo': 0.34; "skip:' 20": 0.34; 'file': 0.34; 'path': 0.35; 'skip:p 30': 0.35; 'there': 0.36; 'url:org': 0.36; 'mode': 0.36; 'subject:: ': 0.37; 'self': 0.38; 'files': 0.38; 'url:mail': 0.40; 'some': 0.40; 'your': 0.60; 'backup': 0.66; 'received:176': 0.66; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; '215': 0.84; '261': 0.84; 'pardon': 0.84; 'received:176.31': 0.84; 'stamp': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=simple/simple; d=wirtel.be; s=default; t=1455447672; bh=Hn9Q6OX1ZhnkBKuKIDQ8haIiNZyKvi8eT8IBtqBBkk0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=mwjnpY3vsJD4xzkC7zH90/9Ianq//+Oj+njUTQqirDXw6ASrmST3+njtg9acj/2Du dKV6HfDhs6mzrRTjmacq9uE43cVJ6b9QPqO366hSMDCTWCO4Z4XculcgegFJf8t0Vt Ao3ZKpc2bBcYMeHLTZKcy902rlQI/67ELYNmBTr7uE8H7uGqHYsYJz3gHexTfqgFa7 ARjRy76P7RZIBMrNvn55ae6gTlbBm7c7PuQv06z7HUbZa4tV70UfOdDNQsftHp0RrE IYfno8DU7JNA3YjxnRD16pfwbQmwHVT9RV1j1rtWSzZxpNQ+GP3qoB0pfAZBKm4KVe DpzEIHr6pQoqw== |
| Content-Disposition | inline |
| In-Reply-To | <56C05CEF.5080304@rece.vub.ac.be> |
| User-Agent | Mutt/1.5.23.1 (2014-03-12) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21rc2 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:102911 |
Show key headers only | View raw
Hi Antoon,
EINTR, is an error when there is an emited signal to your process.
http://man7.org/linux/man-pages/man2/read.2.html
Look for EINTR in this page
On 02/14, Antoon Pardon wrote:
>I have written a small backup program, that uses ftplib to make
>remote backups. However recentely the program starts to regularly
>raise IndexErrors, as far as I can see the problem is in socket.py
>Can anyone shed some light?
>
>This is the traceback:
>
>Traceback (most recent call last):
> File "/usr/local/lib/python-apps/rmtdump/pymain.py", line 93, in main
> Exit_Nr = process(sys.argv)
> File "/usr/local/lib/python-apps/rmtdump/rmtdump.py", line 228, in program
> process(path)
> File "/usr/local/lib/python-apps/rmtdump/rmtdump.py", line 170, in process
> of = rmt.open(rmtsep.join([rmt5lcl(rt), archive]), "wb")
> File "/usr/local/lib/python-apps/rmtdump/ftputil.py", line 198, in open
> return ftpfile(ftp, fn, mode, True)
> File "/usr/local/lib/python-apps/rmtdump/ftputil.py", line 69, in __init__
> self.cnct = self.ftp.transfercmd("%s %s" % (cmd, rfn))
> File "/usr/lib/python2.7/ftplib.py", line 376, in transfercmd
> return self.ntransfercmd(cmd, rest)[0]
> File "/usr/lib/python2.7/ftplib.py", line 693, in ntransfercmd
> conn, size = FTP.ntransfercmd(self, cmd, rest)
> File "/usr/lib/python2.7/ftplib.py", line 339, in ntransfercmd
> resp = self.sendcmd(cmd)
> File "/usr/lib/python2.7/ftplib.py", line 249, in sendcmd
> return self.getresp()
> File "/usr/lib/python2.7/ftplib.py", line 215, in getresp
> resp = self.getmultiline()
> File "/usr/lib/python2.7/ftplib.py", line 201, in getmultiline
> line = self.getline()
> File "/usr/lib/python2.7/ftplib.py", line 186, in getline
> line = self.file.readline(self.maxline + 1)
> File "/usr/lib/python2.7/socket.py", line 478, in readline
> if e.args[0] == EINTR:
>IndexError: tuple index out of range
>
>Locals by frame, innermost last
>
>Frame main in /usr/local/lib/python-apps/rmtdump/pymain.py at line 111
> backtrace = <function backtrace at 0x7ff8c5d36230>
> pn = 'rmtdump'
> process = <function program at 0x7ff8c5d361b8>
>
>Frame program in /usr/local/lib/python-apps/rmtdump/rmtdump.py at line 261
> aborted = True
> argv = ['/usr/local/sbin/rmtdump']
> path = '/home'
>
>Frame process in /usr/local/lib/python-apps/rmtdump/rmtdump.py at line 190
> b_rt = '/home'
> backupflag = 'r--'
> backupstamp = 1453021366
> checkstamp = 1450374304
> dirs = ['antoon', 'jenny', 'lost+found', 'photo']
> entries = ['0-home', 'antoon', 'homelady', 'jenny', 'lost+found', 'photo', 'recover']
> entry = 'recover'
> fileinfo = posix.stat_result(st_mode=16877, st_ino=2490369, st_dev=2058L, st_nlink=5, st_uid=0, st_gid=0, st_size=4 ...
> files = []
> fqpn = '/home/recover'
> islink = <function islink at 0x7ff8c9073500>
> ismount = <function ismount at 0x7ff8c9073758>
> last = 1455445804.979914
> newfn = 'home/!2016-01-17@10_02_46-tbz'
> now = 1455445804
> nr_of_tries = 0
> of = None
> oldfn = 'home/!ENTRY-tbz'
> path = '/home'
> rt = '/home'
> stamp = '1450374304'
> start = 1455445804
> timefn = '!2016-01-17@10_02_46-tbz'
> tryal = 1
> update = True
>
>Frame open in /usr/local/lib/python-apps/rmtdump/ftputil.py at line 198
> fn = 'home/!ENTRY-tbz'
> ftp = <ftputil.FTP instance at 0x7ff8c5d3add0>
> mode = 'wb'
> self = <ftputil.FTP instance at 0x7ff8c5d3acf8>
>
>Frame __init__ in /usr/local/lib/python-apps/rmtdump/ftputil.py at line 69
> bound = True
> ch = 'b'
> cmd = 'STOR'
> cn = <ftputil.FTP instance at 0x7ff8c5d3add0>
> count = 1
> mode = 'wb'
> rfn = 'home/!ENTRY-tbz'
> self = None
>
>Frame transfercmd in /usr/lib/python2.7/ftplib.py at line 376
> cmd = 'STOR home/!ENTRY-tbz'
> rest = None
> self = <ftplib.FTP_TLS instance at 0x7ff8c5d4c878>
>
>Frame ntransfercmd in /usr/lib/python2.7/ftplib.py at line 693
> cmd = 'STOR home/!ENTRY-tbz'
> rest = None
> self = <ftplib.FTP_TLS instance at 0x7ff8c5d4c878>
>
>Frame ntransfercmd in /usr/lib/python2.7/ftplib.py at line 352
> cmd = 'STOR home/!ENTRY-tbz'
> conn = <socket._socketobject object at 0x7ff8c5d2d2f0>
> host = '192.110.0.54'
> port = 64649
> rest = None
> self = <ftplib.FTP_TLS instance at 0x7ff8c5d4c878>
> size = None
>
>Frame sendcmd in /usr/lib/python2.7/ftplib.py at line 249
> cmd = 'STOR home/!ENTRY-tbz'
> self = <ftplib.FTP_TLS instance at 0x7ff8c5d4c878>
>
>Frame getresp in /usr/lib/python2.7/ftplib.py at line 215
> self = <ftplib.FTP_TLS instance at 0x7ff8c5d4c878>
>
>Frame getmultiline in /usr/lib/python2.7/ftplib.py at line 201
> self = <ftplib.FTP_TLS instance at 0x7ff8c5d4c878>
>
>Frame getline in /usr/lib/python2.7/ftplib.py at line 186
> self = <ftplib.FTP_TLS instance at 0x7ff8c5d4c878>
>
>Frame readline in /usr/lib/python2.7/socket.py at line 478
> buf = <cStringIO.StringO object at 0x7ff8c5d40298>
> buf_len = 0
> e = timeout()
> self = <socket._fileobject object at 0x7ff8c7b75b50>
> size = 8193
>--
>https://mail.python.org/mailman/listinfo/python-list
--
Stéphane Wirtel - http://wirtel.be - @matrixise
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: ftplib throws: IndexError: tuple index out of range Stephane Wirtel <stephane@wirtel.be> - 2016-02-14 12:00 +0100
csiph-web