Issue222826

classification
Title: "Can't be coerced" Error on passing Java Object as parameter
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pedronis Nosy List: bckfnn, pedronis
Priority: low Keywords:

Created on 2000-11-18.19:22:57 by bckfnn, last changed 2000-11-28.12:19:15 by pedronis.

Messages
msg97 (view) Author: Finn Bock (bckfnn) Date: 2000-11-18.19:22:57
Here is an example: 

JPython 1.1beta4 on java1.2 (JIT: symcjit)
Copyright (C) 1997-1999 Corporation for National Research Initiatives
>>> import PyFrameworkConfig
>>> import PyFrameworkTest
>>> config = PyFrameworkConfig()
>>> test = PyFrameworkTest(config)
Traceback (innermost last):
  File "<console>", line 1, in ?
TypeError: PyFrameworkTest(): 1st arg can't be coerced to PyFrameworkConfig

The PyFramework* classes are written in Java, are in the default package, and
are available in the classpath with with the interpreter is run.

PyFrameworkConfig is defined as:

public class PyFrameworkConfig {
    public int theInt = 0;
    public int theSleepTime = 0;
}

and PyFrameworkTest is defined as:
 
public class PyFrameworkTest implements Runnable {
    int myTestInt = 0;
    int mySleepTime = 0;

    public PyFrameworkTest(PyFrameworkConfig config) {
        myTestInt = config.theInt;
        mySleepTime = config.theSleepTime;

[snip]
msg98 (view) Author: Samuele Pedroni (pedronis) Date: 2000-11-28.12:19:15
Instance of now fixed broken sys.path loading.
History
Date User Action Args
2000-11-18 19:22:57bckfnncreate