I failed to load my own package with PyRAF 2.2.3.dev9+g58ab942 (installed from GitHub) with Python 3.11.11.
I set my package as follows:
directory structure
mypkg
- mypkg.cl
- hello.cl
mypkg.cl
package mypkg
print "hello, mypkg!"
task hello = "dir_mypkg$hello.cl"
task $awk = "$foreign"
clbye()
hello.cl
procedure hello (a)
string a {prompt="a word"}
begin
print ("hello, ", a)
end
loginuser.cl
task $mypkg = /Users/monodera/tmp/test_pyraf/mypkg/mypkg.cl
set dir_mypkg = "/Users/monodera/tmp/test_pyraf/mypkg/"
set imtype = "fits"
set stdimage = imt2048
keep
When I run it in pyraf, I have the following error.
➜ pyraf
setting terminal type to 'xgterm' ...
NOIRLab IRAF Revision 2.18EXPORT Sun Jan 7 19:00:00 MST 2024
This is the EXPORT version of IRAF V2.18 supporting PC systems.
Welcome to IRAF. To list the available commands, type ? or ??. To get
detailed information about a command, type `help <command>'. To run a
command or load a package, type its name. Type `bye' to exit a
package, or `logout' to get out of the CL.
For general inquiries, feedback, and installation issues, please use
one of the email addresses listed below. Bugs within the code can
also be reported through GitLab issues. Specific questions about data
reduction using the GEMINI package should be submitted to the Gemini
External Helpdesk.
Contact: iraf@noirlab.edu or usngo@noirlab.edu
The following commands or packages are currently defined:
clpackage/:
adccdrom/ finder/ mem0/ proto/ system/
cfh12k/ fitsutil/ mscred/ rvsao/ ucsclris/
clpackage/ gemini/ mtools/ softools/ upsqiid/
ctio/ gmisc/ nfextern/ song/ user/
dataio/ guiapps/ noao/ sptable/ utilities/
dbms/ images/ obsolete/ sqiid/ xdimsum/
deitab/ language/ optic/ st4gem/
esowfi/ lists/ plot/ steward/
PyRAF 2.2.3.dev9+g58ab942
Python/CL command line wrapper
.help describes executive commands
--> mypkg
hello, mypkg!
Traceback (innermost last):
File "<CL script CL1>", line 1, in <module>
File "<CL script user.mypkg>", line 16, in mypkg
iraf.task(hello = 'dir_mypkg$hello.cl', PkgName=PkgName,PkgBinary=PkgBinary)
pyraf.tools.irafglobals.IrafError: Unknown parameter requested: "addTask" for task: "mypkg" in pkg: "user"
-->
I'm wondering if there is an issue in the package definition or the code needs to be fixed.
I failed to load my own package with PyRAF 2.2.3.dev9+g58ab942 (installed from GitHub) with Python 3.11.11.
I set my package as follows:
directory structure
mypkg.cl
hello.cl
loginuser.cl
When I run it in pyraf, I have the following error.
I'm wondering if there is an issue in the package definition or the code needs to be fixed.