Argument type mismatch

Ulyana's Avatar

Ulyana

22 Apr, 2024 09:47 PM

Hi!
I installed nodebox, launched it, created a couple of nodes, but when I tried to continue working, I got various errors. For example, this:

java.lang.IllegalArgumentException: argument type mismatch
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at nodebox.function.JavaLibrary$StaticMethodFunction.invoke(JavaLibrary.java:104)
at nodebox.node.NodeContext.invokeFunction(NodeContext.java:342)
at nodebox.node.NodeContext.invokeNode(NodeContext.java:238)
at nodebox.node.NodeContext.invokeNode(NodeContext.java:232)
at nodebox.node.NodeContext.renderNode(NodeContext.java:121)
at nodebox.node.NodeContext.renderChild(NodeContext.java:207)
at nodebox.node.NodeContext.renderNode(NodeContext.java:117)
at nodebox.node.NodeContext.renderNode(NodeContext.java:93)
at nodebox.client.NodeBoxDocument$3.doInBackground(NodeBoxDocument.java:1263)
at nodebox.client.NodeBoxDocument$3.doInBackground(NodeBoxDocument.java:1260)
at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

How did this happen when creating different nodes — rect & lookup.

I've never worked at nodebox before, I've never done any programming. I'm just a designer who was attracted by the apparent simplicity of working with nodes.

I think it's important:
OS: Windows 10 Pro
NodeBox: 3.0.53

I tried reinstalling the program, clearing the cache, changing the system language to English... but nothing helped.
I will be glad if anyone who has faced a similar problem or knows how to solve it will answer.

Ulyana

  1. Support Staff 1 Posted by john on 23 Apr, 2024 02:14 AM

    john's Avatar

    Ulyana,

    I'm sorry you are having troubles during your first encounter with Nodebox. Some people have a little trouble at first, but if you can get through that things will get better.

    I will try to help you but will need a little more information. You said you were able to install Nodebox and create a couple of nodes without problems - true? What exactly did you do that triggered the error?

    Are you able to save the file that is giving you the error? If so, please save it, zip it, and attach it with a reply to this message. I will have a look at it and see if I can spot anything obvious.

    Hang in there!

    John

  2. 2 Posted by Ulyana on 23 Apr, 2024 05:37 PM

    Ulyana's Avatar

    Yes, I successfully installed nodebox, I was able to create a file and several nodes.

    In the first document "people":
    Created a new file
    Import csv
    Import csv → Keys
    Import csv → Null
    Null → Lookup
    Keys → Slice (start index 1, size 1)
    Slice → Lookup
    Lookup → Distinct
    Lookup → Count
    Distinct → Count (same values)
    Keys → Slice2 (duplicate but start index 3, size 1)
    Null → Lookup2
    Slice2 → Lookup2

    When I click twice on Lookup2:
    java.lang.IllegalArgumentException: java.lang.ClassCastException@cf11f4e
    at jdk.internal.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at nodebox.function.JavaLibrary$StaticMethodFunction.invoke(JavaLibrary.java:104)
    at nodebox.node.NodeContext.invokeFunction(NodeContext.java:342)
    at nodebox.node.NodeContext.invokeNode(NodeContext.java:238)
    at nodebox.node.NodeContext.invokeNode(NodeContext.java:232)
    at nodebox.node.NodeContext.renderNode(NodeContext.java:121)
    at nodebox.node.NodeContext.renderChild(NodeContext.java:207)
    at nodebox.node.NodeContext.renderNode(NodeContext.java:117)
    at nodebox.node.NodeContext.renderNode(NodeContext.java:93)
    at nodebox.client.NodeBoxDocument$3.doInBackground(NodeBoxDocument.java:1263)
    at nodebox.client.NodeBoxDocument$3.doInBackground(NodeBoxDocument.java:1260)
    at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

    And then I click twice again, and the numbers in the orange bar change:
    java.lang.IllegalArgumentException: java.lang.ClassCastException@773ffaf7
    at jdk.internal.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at nodebox.function.JavaLibrary$StaticMethodFunction.invoke(JavaLibrary.java:104)
    at nodebox.node.NodeContext.invokeFunction(NodeContext.java:342)
    at nodebox.node.NodeContext.invokeNode(NodeContext.java:238)
    at nodebox.node.NodeContext.invokeNode(NodeContext.java:232)
    at nodebox.node.NodeContext.renderNode(NodeContext.java:121)
    at nodebox.node.NodeContext.renderChild(NodeContext.java:207)
    at nodebox.node.NodeContext.renderNode(NodeContext.java:117)
    at nodebox.node.NodeContext.renderNode(NodeContext.java:93)
    at nodebox.client.NodeBoxDocument$3.doInBackground(NodeBoxDocument.java:1263)
    at nodebox.client.NodeBoxDocument$3.doInBackground(NodeBoxDocument.java:1260)
    at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

    In the second file "names":
    Created a new file
    Import csv
    Import csv → Keys
    Import csv → Lookup
    Keys → Slice (start index 0, size 1)
    Slice → Lookup
    Lookup → Count
    Ellips → Point
    Point → Rect
    Ellips → Resample

    And now:
    java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
    at org.python.core.PyString.<init>(PyString.java:57)
    at org.python.core.PyString.<init>(PyString.java:70)
    at org.python.core.PyString.<init>(PyString.java:74)
    at nodebox.client.PythonUtils.initializePython(PythonUtils.java:50)
    at nodebox.function.PythonLibrary$1.call(PythonLibrary.java:94)
    at nodebox.function.PythonLibrary$1.call(PythonLibrary.java:90)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

    I hope that I was able to reproduce exactly the sequence of how I tried to work.
    I attached an archive with four files. Hope this helps.

  3. Support Staff 3 Posted by john on 23 Apr, 2024 07:54 PM

    john's Avatar

    Hi Ulyana,

    Thanks for sending this.

    I was able to run both of your Nodebox files.

    In the first network, people. all nodes rendered fine for me except lookup2. In that case you accidentally switched your two inputs, feeding your list (from null1) into the key port and your keys (from slice2) into your list port. Once I switched them, the node rendered fine.

    The second, Names, worked fine for me. All nodes rendered correctly. But that was from my Mac.

    The error on that second network was a language error: "Cannot create PyString with non-byte value"

    I did some more research on the Nodebox forum and found a few other similar reports over the years. This problem only occurs on Windows systems, and seems to happen to people who may have unicode characters in the user directory of their file path (Russian, Chinese, Portuguese, etc.). Yet other Windows users, even with unicode characters in their names, are able to run the exact same file with no issues.

    So it seems like there is some subtle bug in the Windows version of NodeBox interacting with something unusual in your particular file system.

    Looking out on the web I found other references to this error. Apparently it relates to a known issue in Jython (the Java-based version of Python used by NodeBox) involving unicode characters, often Chinese characters. But there seems to be no easy fixes.

    If you have access to some other machine, you could try repeating your tutorial on that machine and see if you have better luck. In one similar case Frederik suggested moving Nodebox up to the C: level to eliminate unicode file path issues, but that didn't work for one user. You could also try installing a previous version of NodeBox (again a long shot).

    This is frustrating. I'm sorry you are having this issue. I wish there was more I could do.

    You might at least try switching the inputs on lookup2 in your people network and see if that resolves your problem in that case. You might also try a different CSV file (maybe without Cyrillic characters) or maybe try other networks that do not use CSV input.

    But I fear the language error will keep cropping up for you. Please try the above suggestions and see if that helps.

    I am adding Frederik (the inventor of Nodebox) just in case he can add anything.

    John

  4. 4 Posted by Ulyana on 05 May, 2024 03:35 PM

    Ulyana's Avatar

    Hi John,

    I'm sorry for the long silence.

    I moved folder with Nodebox up to the C:, and it really helped. I was able to work with old files where I had problems and errors, and I was able to create new files and so far I have not encountered any more errors.

    Thank you so much for your help!

    Ulyana

  5. Support Staff 5 Posted by john on 05 May, 2024 04:38 PM

    john's Avatar

    Ulyana,

    Great news! Thanks for sharing it with us.

    Good luck with your future NodeBox adventures. I hope to hear from you again.

    John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

24 Mar, 2025 09:21 PM
20 Mar, 2025 06:07 AM
20 Mar, 2025 02:39 AM
18 Mar, 2025 05:24 AM
14 Mar, 2025 08:32 AM

 

10 Mar, 2025 06:36 PM
10 Mar, 2025 06:36 PM
10 Mar, 2025 06:36 PM
10 Mar, 2025 12:30 AM
02 Mar, 2025 12:34 AM
01 Mar, 2025 12:27 AM