[yt-svn] commit/yt-3.0: MatthewTurk: Adding a note about AssertionError being from incorrect ramses fields.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Mar 28 13:02:04 PDT 2013


1 new commit in yt-3.0:

https://bitbucket.org/yt_analysis/yt-3.0/commits/382704af8a3f/
Changeset:   382704af8a3f
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-03-28 21:01:49
Summary:     Adding a note about AssertionError being from incorrect ramses fields.
Affected #:  1 file

diff -r 2b47da9b16a987f4a48d03afef600548637304cd -r 382704af8a3f86e440e3d6a3bd25d8e4671e3412 yt/frontends/ramses/data_structures.py
--- a/yt/frontends/ramses/data_structures.py
+++ b/yt/frontends/ramses/data_structures.py
@@ -94,7 +94,12 @@
                              self.amr_header['ncpu']):
                 header = ( ('file_ilevel', 1, 'I'),
                            ('file_ncache', 1, 'I') )
-                hvals = fpu.read_attrs(f, header)
+                try:
+                    hvals = fpu.read_attrs(f, header, "=")
+                except AssertionError:
+                    print "You are running with the wrong number of fields."
+                    print "Please specify these in the load command."
+                    raise
                 if hvals['file_ncache'] == 0: continue
                 assert(hvals['file_ilevel'] == level+1)
                 if cpu + 1 == self.domain_id and level >= min_level:

Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list