From: Bryan W. <bry...@gm...> - 2015-05-21 20:08:18
|
Good afternoon, My name is Bryan Williams. I work for the Florida Forest Service in their Forest Logistics and Support Bureau. I’m working on a program that takes weather data and visualizes it using matplotlib and Basemap. I’m currently having an issue with matplotlib 1.4.3 for Python 3.4.3 running under Solaris 5.10. I am getting a Runtime Error whenever I try calling the read_png file from matplotlib._png. (I’m using this to add a small .png file of the Forest Service’s sheld to the picture). The error is the following: Traceback (most recent call last): File "drawmaps.py", line 845, in <module> arr_lena = read_png(fn) RuntimeError: Error closing dupe file handle I don’t quite understand the error I’m getting, and as you can see, the traceback gives very little information. I also tried Google for help, but to no avail; entering the error message as is into Google doesn’t return anything relating to the problem, and putting quotes around “Error closing dupe file handle” yields about 10 results, with one of them being an unanswered question from 2014 regarding the same issue. As per your request on the website, here’s what I get from uname –a: SunOS [server name withheld] 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5220 I built Python 3.4.3 from source and installed matplotlib through pip, and didn’t make any changes to the matplotlibrc file. I was able to reproduce the problem again running these commands in the Python interactive prompt, which emulates the snippet of script that causes the error: Python 3.4.3 (default, May 15 2015, 13:52:23) [GCC 4.9.2] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib._png import read_png >>> from matplotlib.cbook import get_sample_data >>> import os; path=os.getcwd() >>> fn = get_sample_data(path + '/resources/shield.png', asfileobj=False) >>> arr_lena = read_png(fn) Traceback (most recent call last): File "<stdin>", line 1, in <module> RuntimeError: Error closing dupe file handle If you’d like a copy of the problem script, please let me know. Any and all help is greatly appreciated. Thank you in advance! -- BMW |