Forum OpenACS Development: User tracking bug

Collapse
Posted by Matthew Coupe on
Hey,

I've installed User Tracking and got it to present statistics etc. however, when I click "update data" I get the following error message:

The file is /user-tracking/loading2

(I'm running OpenACS 5.2.3 on Postgres 7.4)

Error:
expected integer but got "08" (looks like invalid octal number)
while executing
"expr $lastday + 1"
invoked from within
"if {[exists_and_not_null LastTime]} {

set campos [split $LastTime "/-"]

set lastyear [lindex $campos 2]
set lastmonth [linde..."
("uplevel" body line 42)
invoked from within
"uplevel {
ad_page_contract {
@author sergiog (mailto:sergiog@tid.es)
@author doa (mailto:doa@tid.es)
@creation-date 2005-01-10
} -query {
{config ""}
..."
(procedure "code::tcl::/var/lib/aolserver/nccedudotlrn/packages/user-tra..." line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare "
(procedure "template::adp_parse" line 30)
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 5)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/$path""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$path"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path_info..."

Collapse
2: Re: User tracking bug (response to 1)
Posted by Matthew Coupe on
The problem was the invalid octal number.

It was reading the 08 incorrectly and producing an erro when trying to increase or decrease this number.

The error is fixed by adding the following to line 58 of user-tracking/www/loading2.tcl

scan $lastday %d lastday
scan $todayday %d todayday

This removes the leading 0.

I can submit this if someone lets me know what to do?

cheers
Matthew