"clobber" fails when writing files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyfits (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
TEST CASE:
the following code fails for me if the output file already exists:
>>> import pyfits
>>> pyfits.
>>> pyfits.
/var/
DeprecationW
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/
1483, in writeto
File "/var/lib/
4895, in writeto
File "/var/lib/
in showwarning
File "/usr/lib/
TypeError: formatwarning() takes exactly 4 arguments (5 given)
This happens on Ubuntu 10.04 with python 2.6.2 and pyfits 1.3-2.
REGRESSION POTENTIAL:
simple fix to the 2.6 api of the warnings module, should not break anything.
original report:
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:/
From there I got the following additional info:
This bug was fixed upstream in pyfits version 2.1. See the CHANGELOG here:
http://
See this scipy mailing list thread:
http://
Related branches
description: | updated |
Changed in pyfits (Ubuntu): | |
status: | Confirmed → Fix Released |
tags: | added: removal-candidate |
If you prefer to patch for this bug alone, you can use this (from upstream):
https:/ /svn.stsci. edu/trac/ ssb/pyfits/ changeset? new=trunk% 2Flib%2FNP_ pyfits. py%40427& old=trunk% 2Flib%2FNP_ pyfits. py%40426