Python Script output is hidden on Hub but not on local KAP

Hi there,

I am encoutering a weird issue involving the Python Script node, where the output data is marked as hidden, which causes the workflow to break down the line.

To give some context, were are experimenting with a Python script we wrote in order to provide asynchronous REST request functionality, as we are limited in terms of bandwidth and resource management with the built-in nodes in most cases.

The python script ends with a main() function, which is the only way (as far as I know) to run it async.

import knime.scripting.io as knio
from pandas import DataFrame, isna, Series
from typing import List, Optional
from aiohttp import ClientSession, ClientResponse, ClientTimeout, FormData
from collections import namedtuple
from asyncio import run, gather, TimeoutError, Semaphore, sleep
from dataclasses import dataclass
from functools import partial
from enum import Enum
from json import dumps

...

# Main 

async def main() -> None:
    df = knio.input_tables[0].to_pandas()
    prepare_output_table(df)
    
    rate_limiter = create_rate_limiter()

    async with ClientSession() as session:
        tasks = [
            process(session, df, index, rate_limiter) 
            for index 
            in df.index.tolist()
        ]        
        await gather(*tasks)

    knio.output_tables[0] = knio.Table.from_pandas(df)

run(main())

This runs really fine in our tests, so here comes the weird part.

This is the output when running the script locally:
image

And here is the output when running the exact same script with the exact same data, but remotely (on the Business Hub):

Something that I have seen in some cases but normally aren’t necessarily bad, except in this case it seems to mess up with the retry loop I have setup (which is necessary as Python seems prone to timeouts when running on the Hub):

I can’t seem to make sense of this, and any node I have tried between the Catch and the Loop End encountered the exact same error, and needless to say, there isn’t any classNames column.

What is more puzzling is that this issue will happen every single time with this particular workflow, but another one that I am testing in production (and is querying a different API) has no issue of the sort, and the Python Script does show the expected output.

If anyone has any clue, I’m all ears :slight_smile:

Von

Edit: Actually it doesn’t only mess up the retry loop but the whole workflow. I tried removing the try catch loop and running only the Python script, and the hidden data crashes other nodes down the line:

Again, this is not reproductible in local, only on the Hub. But this is a major issue now :confused: