Skip to main content
10000+ Posts
Using Scripted parameter to return password or environment variable. fme string encoding help

I have a workspace which uses input user credentials to do stuff. I also want the workspace to work during testing by using System environment variables. This is working great for things like DBNAME, HOST, PORT etc where the user inputs are strings (text user parameters). I can simply just enter in ${PORT} for example and FME will look for a set environment variable. Where I'm having trouble is with the password. I can't do the same thing for the password so I've created a simple scripted parameter which first checks if there is a user password set and if not try and see if there is an environment variable. In most cases it works well, however, I've discovered that some special cahrachters are getting encoded by FME - So something like @ becomes '<at>'. Does anyone know a way to 'decode' these encoded strings. Ideally it'd be done in the scripted parameter, however, if it has to be done in the workspace so be it.Short from using

Use PythonCaller to get list of files in directory on FTP site

OK I give up - help me!This is my first attempt to use the PythonCaller (since FTPCaller can't yet download directories or accept wildcards).  I've cobbled together some Python to retrieve a directory listing from an FTP site which I want to output (probably as a list) so I can generate the name of the file I want to download and pass it to FTPCaller.I've done a whole lot of Googling but I can't fix this error on the feature.setAttribute line:2016-10-12 17:46:48|   1.9|  0.1|WARN  |Python Exception <TypeError>: not all arguments converted during string formatting2016-10-12 17:46:48|   1.9|  0.0|WARN  |Traceback (most recent call last):  File "<string>", line 30, in inputTypeError: not all arguments converted during string formatting2016-10-12 17:46:48|   1.9|  0.0|ERROR |Error encountered while calling method `input'2016-10-12 17:46:48|   1.9|  0.0|FATAL |f_32(PythonFactory): PythonFactory failed to process f

Badge Winners

  • English Speaker
    darrenkhas earned the badge English Speaker
  • Student (Grey)
    sparkihas earned the badge Student (Grey)
  • Expert (Grey)
    sparkihas earned the badge Expert (Grey)
  • Teacher (Bronze)
    sparkihas earned the badge Teacher (Bronze)
  • Teacher (Grey)
    sparkihas earned the badge Teacher (Grey)
Show all badges

Community Stats

32,510
Posts
123,476
Replies
40,720
Members