Closed jesieleo closed 2 years ago
Hi, thanks for your interests in xgrads
and raising this.
I have a rule that xgrads
should follow GrADS
. For your example, I tried with OpenGrADS
and it reports an error of the ctl file:
This means that the vars records are not complete (variable comments are missing). So xgrads
raises a similar exception, which is not a surprise. After adding the comments, as you did, things get fixed.
Thank you for your reply. Now I fully understand. Your library has helped me solve a big problem. Thank you very much!
The problem may be caused by a version inconsistency between v2.0.2.oga.2 & v2.1.a2.oga.1 ?
So the new version is more tolerant. OK, I think your solution is OK. Could you please send a PR and then becomes one of the contributor?
Thank you for your quick feedback. As I am a novice Githuber, I have spent some time learning PR. Now I have submitted it, please check if it is correct.
Also, I found that the./xgrads/core.py
which I downloaded from pypi
differs from those on github
, is it because you updated pypi in June 2022 and the core.py
file the following August?
Yes, the pypi version is not the latest version. I'll check your PR.
Thank you again for your attention and warm response, and thank you for creating this project and helping me solve a pressing problem.
When reading such a ctl, it will report an error because we forgot to name the variable
ValueError: not enough values to unpack (expected 4, got 3)
Change it to this and it will work normally
This problem occurs in
File "D:\Anaconda3\lib\site-packages\xgrads\core.py", line 880, in init self.name, self.zcount, self.storage, self.comment = \
change it like this can solve the problem