Closed matthieutrs closed 4 years ago
I also get the same error message when using the .py and .conf files from /Pyxis/doc/example
.
Another casualty of the Python3 transition... Sorry, doesn't look like we tested it very well with py3!
Could you try changing the offending statement to
exec open(filename, "rt") in Pyxis.Context
and let me know if that works?
I'm doing the install for @matthieutrs, should that be:
exec open(filename, "rt") in Pyxis.Context;
@o-smirnov? Or does python not care?
open(filename, "rt") in Pyxis.Context;
seems to have done the trick
Thanks a lot @o-smirnov and @adrianjhpc, that problem is solved!
I'm facing another one now: the procedures defined in my pyxis-*.py
files are unrecognized.
More precisely, I set the pyxis-wsrt21cm.py file from the example in my base directory and I then run pyxis cal_ms
. The command returns:
2020/07/03 15:56:11 PYXIS: ===[ Pyxis: Python eXtensions for Inteferometry Scripting (C) 2013 by Oleg Smirnov <oms@ska.ac.za> ]===
2020/07/03 15:56:11 PYXIS: VERBOSE=1 by default
2020/07/03 15:56:11 PYXIS: loading Pyxis into context '__main__'
2020/07/03 15:56:11 PYXIS: auto-loading from .: pyxis-wsrt21cm.py
2020/07/03 15:56:11 PYXIS: auto-loading from .: pyxis-wsrt21cm.py
2020/07/03 15:56:11 PYXIS: running command cal_ms
2020/07/03 15:56:11 ABORT: undefined command 'cal_ms'
2020/07/03 15:56:11 PYXIS:
2020/07/03 15:56:11 INFO: elapsed time is 0h0m0.00s
I don't understand:
ABORT: undefined command 'cal_ms'
message as the cal_ms function is indeed defined in pyxis-wsrt21cm.py.Would you have an idea on how to fix that?
Apologies I only ported the necessary bits of pyxis to perform the meqtrees tests and didn't extensively test it. I was under impression it was abandonware since we now have switched to things like stimela to pipeline instead.
Please raise issues and I will get back to it when I return from leave.
On Fri, Jul 3, 2020 at 5:05 PM matthieu.trs notifications@github.com wrote:
Thanks a lot @o-smirnov https://github.com/o-smirnov and @adrianjhpc https://github.com/adrianjhpc, that problem is solved!
I'm facing another one now: the procedures defined in my pyxis-*.py files are unrecognized.
More precisely, I set the pyxis-wsrt21cm.py file from the example https://github.com/ska-sa/pyxis/blob/master/Pyxis/doc/example/pyxis-wsrt21cm.py in my base directory and I then run pyxis cal_ms. The command returns:
2020/07/03 15:56:11 PYXIS: ===[ Pyxis: Python eXtensions for Inteferometry Scripting (C) 2013 by Oleg Smirnov oms@ska.ac.za ]=== 2020/07/03 15:56:11 PYXIS: VERBOSE=1 by default 2020/07/03 15:56:11 PYXIS: loading Pyxis into context 'main' 2020/07/03 15:56:11 PYXIS: auto-loading from .: pyxis-wsrt21cm.py 2020/07/03 15:56:11 PYXIS: auto-loading from .: pyxis-wsrt21cm.py 2020/07/03 15:56:11 PYXIS: running command cal_ms 2020/07/03 15:56:11 ABORT: undefined command 'cal_ms' 2020/07/03 15:56:11 PYXIS: 2020/07/03 15:56:11 INFO: elapsed time is 0h0m0.00s
I don't understand:
- why we see 2 identical autoloading messages;
- the ABORT: undefined command 'cal_ms' message as the cal_ms function is indeed defined in pyxis-wsrt21cm.py https://github.com/ska-sa/pyxis/blob/master/Pyxis/doc/example/pyxis-wsrt21cm.py .
Would you have an idea on how to fix that?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ska-sa/pyxis/issues/100#issuecomment-653588014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4RE6SWI4W25GB4JTNZXFLRZXXSTANCNFSM4OPBRNBQ .
Benjamin Hugo
PhD. student, Centre for Radio Astronomy Techniques and Technologies Department of Physics and Electronics Rhodes University
Junior software developer Radio Astronomy Research Group South African Radio Astronomy Observatory Black River Business Park Observatory Cape Town
Ok, thanks! I'm raising a new issue as this one has been solved thanks to @o-smirnov and @adrianjhpc.
Not so much abandonware as neglectware... It can still be useful for ad hoc processing scripts, so I'd like to fix it.
Since @bennahugo got most of it to work, I'm sure it's just a few odds and ends that need fixing. I'll take a look.
My fault for not providing proper test coverage in the first place!
Hello,
I am trying to use pyxis with loading .conf and .py files. More precisely, I have 2 files (named
pyxis-ckat.py
andpyxis-ckat.conf
) in some folder and I'm autoloading them. Yet I receive the following error message:This is a procedure I was using before moving to 1.7.0 and that was working fine, so I doubt that the problem comes from my
pyxis-ckat.py
andpyxis-ckat.conf
files... Would you have any hint on how to solve that?