[Bug 432459] [NEW] "clobber" fails when writing files
Ole Streicher
launchpad at liska.ath.cx
Fri Sep 18 12:49:02 UTC 2009
Public bug reported:
the following code fails for me if the output file already exists:
>>> import pyfits
>>> pyfits.PrimaryHDU().writeto('Map.fits', clobber='True')
/var/lib/python-support/python2.6/pyfits/NP_pyfits.py:4895:
DeprecationWarning: functions overriding warnings.showwarning() must
support the 'line' argument
warnings.warn( "Overwrite existing file '%s'." % name)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/lib/python-support/python2.6/pyfits/NP_pyfits.py", line
1483, in writeto
classExtensions=classExtensions)
File "/var/lib/python-support/python2.6/pyfits/NP_pyfits.py", line
4895, in writeto
warnings.warn( "Overwrite existing file '%s'." % name)
File "/var/lib/python-support/python2.6/pyfits/NP_pyfits.py", line 76,
in showwarning
_showwarning(message, category, filename, lineno, file)
File "/usr/lib/python2.6/warnings.py", line 29, in _show_warning
file.write(formatwarning(message, category, filename, lineno, line))
TypeError: formatwarning() takes exactly 4 arguments (5 given)
This happens on Ubuntu 9.04 with python 2.6.2 and pyfits 1.3-2.
I contacted the pyfits author and go the answer that pyfits 1.3 is not
compatible with python 2.6.
So, probably it would be the best to update the pyfits in the repository
with a current version?
Fedora Linux had the same problem, see https://bugzilla.redhat.com/show_bug.cgi?id=509203
>From there I got the following additional info:
This bug was fixed upstream in pyfits version 2.1. See the CHANGELOG
here:
http://www.stsci.edu/resources/software_hardware/pyfits/release
See this scipy mailing list thread:
http://mail.scipy.org/pipermail/astropy/2009-June/000827.html
** Affects: pyfits (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
the following code fails for me if the output file already exists:
>>> import pyfits
>>> pyfits.PrimaryHDU().writeto('Map.fits', clobber='True')
/var/lib/python-support/python2.6/pyfits/NP_pyfits.py:4895:
DeprecationWarning: functions overriding warnings.showwarning() must
support the 'line' argument
warnings.warn( "Overwrite existing file '%s'." % name)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/lib/python-support/python2.6/pyfits/NP_pyfits.py", line
1483, in writeto
classExtensions=classExtensions)
File "/var/lib/python-support/python2.6/pyfits/NP_pyfits.py", line
4895, in writeto
warnings.warn( "Overwrite existing file '%s'." % name)
File "/var/lib/python-support/python2.6/pyfits/NP_pyfits.py", line 76,
in showwarning
_showwarning(message, category, filename, lineno, file)
File "/usr/lib/python2.6/warnings.py", line 29, in _show_warning
file.write(formatwarning(message, category, filename, lineno, line))
TypeError: formatwarning() takes exactly 4 arguments (5 given)
This happens on Ubuntu 9.04 with python 2.6.2 and pyfits 1.3-2.
I contacted the pyfits author and go the answer that pyfits 1.3 is not
compatible with python 2.6.
So, probably it would be the best to update the pyfits in the repository
with a current version?
+
+ Fedora Linux had the same problem, see https://bugzilla.redhat.com/show_bug.cgi?id=509203
+ From there I got the following additional info:
+
+ This bug was fixed upstream in pyfits version 2.1. See the CHANGELOG
+ here:
+
+ http://www.stsci.edu/resources/software_hardware/pyfits/release
+
+ See this scipy mailing list thread:
+
+ http://mail.scipy.org/pipermail/astropy/2009-June/000827.html
--
"clobber" fails when writing files
https://bugs.launchpad.net/bugs/432459
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list