) # 0.5414720812182742
print(xsd) # 0.15748041033663002
print(str("{6.5f}".format(xm)))
I get the following error:
IndexError: tuple index out of range
Can someone suggest me why I am getting this error and how to overcome
this?
Show us the full traceback after expanding and reducing t
) # 0.15748041033663002
print(str("{6.5f}".format(xm)))
I get the following error:
IndexError: tuple index out of range
Can someone suggest me why I am getting this error and how to overcome this?
Thanks in advance
print(str("{:6.5f}".format(xm)))
You want to apply the format 6.5
.format(xm)))
I get the following error:
IndexError: tuple index out of range
Can someone suggest me why I am getting this error and how to overcome this?
Thanks in advance
--
https://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
>> PS: How did you produce the overview over the local variables? That looks
>> nice.
> I started from this recipe:
> http://code.activestate.com/recipes/52215-get-more-information-from-tracebacks/
> made it more to my liking and turned it into a module. So that instead of
>
Antoon Pardon wrote:
>> It looks like the actual error is socket.timeout which is probably raised
>> from somewhere inside the stdlib without args.
>
> I think I know what is going on. I have my own timeout mechanism at work
> here, that works with signals and alarm. When the SIGALRM fires I just
Op 14-02-16 om 14:40 schreef Peter Otten:
>
> PS: How did you produce the overview over the local variables? That looks
> nice.
>
I started from this recipe:
http://code.activestate.com/recipes/52215-get-more-information-from-tracebacks/
made it more to my liking and turned it into a module.
>> Can anyone shed some light?
>>
>> This is the traceback:
>
> [...]
>
>> File "/usr/lib/python2.7/socket.py", line 478, in readline
>> if e.args[0] == EINTR:
>> IndexError: tuple index out of range
>
> The offending line seems
s is the traceback:
[...]
> File "/usr/lib/python2.7/socket.py", line 478, in readline
> if e.args[0] == EINTR:
> IndexError: tuple index out of range
The offending line seems to be part of
try:
data = self._sock.recv(self._rbufsize)
ex
ib.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/py
"/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] =
t ("{0} is {1} years old {3} and ".format(name, age, append))
IndexError: tuple index out of range
dan...@ibex:~/Desktop/python$
Here is my script:
#!/usr/bin/python
# Filename: str_format2.py
age = 23
name = 'Daniel'
append = '6 months
0} is {1} years old {3} and ".format(name, age, append))
IndexError: tuple index out of range
dan...@ibex:~/Desktop/python$
Here is my script:
#!/usr/bin/python
# Filename: str_format2.py
age = 23
name = 'Daniel'
append = '6 months'
print
ld {3} and ".format(name, age, append))
> IndexError: tuple index out of range
> dan...@ibex:~/Desktop/python$
>
Here is my script:
#!/usr/bin/python
> # Filename: str_format2.py
>
> age = 23
> name = 'Daniel'
> append = '6 months'
>
> print (&quo
13 matches
Mail list logo