Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Convert HTML image to PNG image

knozawa
11 - Bolide

Hello,

 

Does Alteryx has a capability to save .png images?  I have a python code that converts HTML url image to PNG image.  When I tried to run it in Alyterx using "run command" tool, it didn't work.  The error said "Either an Output connection or Input connection is required."

 

Thank you,

knozawa

12 REPLIES 12
JohnJPS
15 - Aurora

For some reason the "Run Command" tool always expects to process input.  There are two workarounds would be (1) just to feed it some dummy input, or (2) to use the R tool instead: the R "system()" command will execute your command line on the system.  This works well when executing a command that does not pass anything to/from Alteryx.

Hope that helps!

knozawa
11 - Bolide

Hi JohnJPS,

 

Thank you for your message.  I actually have an excel input that includes HTML url.  Convert HTML to PNG.png

However, it still says either an output connection or input connection is required.  The code works outside of Alteyrx, but I wanted to automate this process in Alteryx. I am not sure how to output .png images from Alteryx.

 

Sincerely,

knozawa

JohnJPS
15 - Aurora

Hi @knozawa

 

Actually, @MattD already wrote a great post on running Python scripts: https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Run-a-Python-Script-in-Alteryx/ta-p/31521

 

Another excellent and more general post by @AlexKo is here: https://community.alteryx.com/t5/Alteryx-Knowledge-Base/The-Run-Command-Write-Source-amp-Read-Result...

 

Hopefully between these, it will explain the Input/Output details and get things running for you.

AdamR_AYX
Alteryx Alumni (Retired)

@knozawa Alteryx has some ability to work with png files.  What is it that you want Alteryx to do with them?

 

Are you able to share your workflow so far so we can take a look?

Adam Riley
https://www.linkedin.com/in/adriley/
knozawa
11 - Bolide

@AdamR_AYX,

 

I would like to convert url image to png image with id numbers. I am getting twitter user url image and user_id using twitter API.  I would like to automate this process in Alteryx.  I would like to embed user id to png image as well. 

 

I attached a workflow.

 

Sincerely,

Kazumi

AdamR_AYX
Alteryx Alumni (Retired)

Hi Kazumi

 

Unfortunately your input file did not come through. (When you want to share a workflow with its files then you will want to use the Options menu -> Export workflow)

 

I've attached a small example workflow which I put together using the Alteryx download tool.

 

Let me know if it is close to what you want to do.

 

Adam

Adam Riley
https://www.linkedin.com/in/adriley/
knozawa
11 - Bolide

@AdamR_AYX,

 

Thank you for your workflow.  I embedded my sample excel sheet into your workflow.

 

The desired output was pretty close to what you created, but not quite.

It was great that I could save to png image.  However, I would like to save different user image as png and name it with user_id.

png with user_id.png

It could done that using python, but I was wondering if Alteryx is able to do the same thing.

 

Sincerely,

Kazumi

AdamR_AYX
Alteryx Alumni (Retired)

I'm afraid the excel sheet didn't come through...  Can you attach it?

Adam Riley
https://www.linkedin.com/in/adriley/
knozawa
11 - Bolide

Hi @AdamR_AYX,

 

I am sorry.  I attached the excel file.

 

Sincerely,

Kazumi

Labels