Spaces in file names are replaced by %20 in KNIME analytics but %2025 on the KNIME server

Dear KNIME experts,
I know that spaces should be avoided in filenames, but this is not considered carefully by many users. I recently came across a strange issue when combining a knime workflow with a python node that reads a file. In knime analytics spaces in filenames were replaced by %20. I deleted this string in the python script. But when I executed the workflow on a server, it failed because on the server spaces were replaced by %2025. I found this a bit strange. Is there any explanation for this behaviour? Thanks in advance
STefan

Hello @sscholz,

A suggestion for the python code is to use the function below from urllib:

urllib.parse.unquote(<the url here>)

It is more consistent with removing escapes so you do not need to manually specify each one to remove in code.

Detailed informaiton on the library:

On your question on the server, I can ping one of the experts internally for this. But using the method above should make it so you do not need to manually specify each %XX to replace.

Hope this helps,
TL

2 Likes

Hello @sscholz,

@Kyle_Watkins got back to me and has said it is probably due to it being encoded twice with how your workflow is set up. (Or the % getting encoded in addition to the 20).

Below you can find the details on how to avoid it:

TL

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.