Good day,
I might be running into scoping issues that is a little baffling to me.
I've create, indexed and successfully tested a package from Tcl command line. However, from within my Woof! controller code, I am unable to use my package commands (getting the below error).
invalid command name "doaa::createUsr" Error code: TCL LOOKUP COMMAND doaa::createUsr Error: invalid command name "doaa::createUsr" while executing "doaa::createUsr $fullname $email $mypasswd" (class "::woof::app::KoromaController" method "signup" line 19) invoked from within "my $action" (class "::woof::Controller" method "process" line 46) invoked from within "controller process" ("try" body line 59)
I am also facing the same when using the Tcl file open command, but I believe both issues are related.
What could I be doing wrong?
Regards,
ATK
Anonymous
Just to rule out the obvious, did you do the steps described in http://woof.sourceforge.net/woof-ug-0.5/_woof/docs/ug/loading_packages
/Ashok
Apologies for my late response, hadn't gotten back to working on this for days.
I tried the following;
added the following line to $woof_install/app/config/application.cfg
set lib_dirs [list /export/apps/tcl868/lib /export/apps/tcl868/lib/doaa]
browser error
Could not load package doaa Error code: NONE Error: Could not load package doaa while executing "error "Could not load package $name"" (procedure "::woof::safe::package_loader" line 18) invoked from within "woof_package_loader doaa 0-" ("package unknown" script) invoked from within "package require doaa" (class "::woof::app::KoromaController" method "signup" line 14) invoked from within "my $action" (class "::woof::Controller" method "process" line 46) invoked from within "controller process" ("try" body line 59)
The issue is still persisting, could I have left something out?
Will have to take a look but it might be a couple of days. Is your code online and public?
Thanks, that should be fine. Yes my code is publicly accessible. How can I share credentials?
Let me know if I should send the credentials here
Please email them to me apnmbx-wits at yahoo.com
I have mailed the details
Received. But replies to your email bounce.
I'll take a look over the weekend.
I had a quick look. Can you please try moving the doaa directory (as well as any other packages that were not part of woof that you may be calling directly or indirectly through doaa) out of the lib directory to somewhere else, say /opt/mylib and then add the following line to config/application.cfg
set lib_dirs [list /opt/mylib]
Please try that and let me know.
Also I presume you are using lighttpd?
/Ashok
Last edit: Ashok P. Nadkarni 2020-06-12
I have tried moving the packages to the /opt directory but still cannot be found. Previously, I had run everything as root user to ensure it's not permissions issues.
Packages in /opt/mylib directory
root@koroma:/export/apps/woof05b4# ll /opt/mylib/
total 20
drwxr-xr-x 5 bwaan bwaan 4096 Jun 15 03:45 ./
drwxr-xr-x 3 root root 4096 Jun 15 03:38 ../
drwxr-xr-x 2 bwaan bwaan 4096 Jun 15 03:44 doaa/
drwxr-xr-x 2 bwaan bwaan 4096 Jun 15 03:45 sqlite3.21.0/
drwxr-xr-x 126 bwaan bwaan 4096 Jun 15 03:45 tcllib1.18/
lib dirs configuration
root@koroma:/export/apps/woof05b4# cat config/application.cfg
. . . .
set lib_dirs [list /opt/mylib]
Still getting the following from my web page:
Could not load package doaa Error code: NONE Error: Could not load package doaa while executing "error "Could not load package $name"" (procedure "::woof::safe::package_loader" line 18) invoked from within "woof_package_loader doaa 0-"
. . . .
Regards,
Alie