Closed tin900 closed 6 months ago
From the changelog:
CHANGES IN this.path 2.0.0 (2023-08-08):
SIGNIFICANT USER-VISIBLE CHANGES:
* this.path() was misleading users into believing it returns the
path of the script in which it is written. In actuality, it
returns the path of the executing script. As such, it was renamed
to sys.path() in accordance with the other call stack inspection
functions sys.call(), sys.frame(), sys.nframe(), and
sys.function(). Related functions that were renamed:
old new
[1,] this.dir sys.dir
[2,] here sys.here
[3,] this.proj sys.proj
[4,] rel2here rel2sys.dir
[5,] LINENO sys.LINENO
[6,] try.this.path try.sys.path
[7,] set.this.path set.sys.path
[8,] unset.this.path unset.sys.path
[9,] set.this.path.jupyter set.sys.path.jupyter
this.path() was replaced by a function that returns the path of
the script in which it is written. It does this by looking for a
source reference with an appropriate source file, or inspects the
environment in which it is called for an associated path, or
returns the path of the executing script, as before. Related
functions that were replaced:
[1] this.dir here ici this.proj
[5] rel2here LINENO try.this.path check.path
[9] check.dir check.proj
Try to use this.path::sys.path()
instead
It appears that
clear_script_objects()
does not work.See error message:
And after re-running:
I gather it is an issue with the underlying
this.path
package.Check the changelog to see what changed.