Jump to content

Recommended Posts

Hello

I am trying to create an application. And transfer the state from one block to another, and the data has been sent, but the script does not run. What could be the problem?

 

Debug output:

[23:56:06.497] youtrack time[Script Filter] Queuing argument '(null)'
[23:56:07.198] youtrack time[Script Filter] Script with argv '(null)' finished
[23:56:07.202] youtrack time[Script Filter] {"items": [{"uid": "DOD-7", "title": "DOD-7 \u0420\u0430\u0441\u043f\u043e\u0437\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 real-time", "arg": "DOD-7", "match": "DOD-7", "autocomplete": "DOD-7 1h", "subtitle": "track \"1h\"", "text": {"copy": "DOD-7", "largetype": "DOD-7"}, "valid": true}, {"uid": "DOD-6", "title": "DOD-6 \u041e\u0431\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e yolo \u043d\u0430 \u041b\u042d\u041f", "arg": "DOD-6", "match": "DOD-6", "autocomplete": "DOD-6 1h", "subtitle": "track \"1h\"", "text": {"copy": "DOD-6", "largetype": "DOD-6"}, "valid": true}, {"uid": "DOD-4", "title": "DOD-4 \u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0440\u0430\u043c\u043e\u043a \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430", "arg": "DOD-4", "match": "DOD-4", "autocomplete": "DOD-4 1h", "subtitle": "track \"1h\"", "text": {"copy": "DOD-4", "largetype": "DOD-4"}, "valid": true}, {"uid": "DOD-8", "title": "DOD-8 \u041f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 TF Serving yolo", "arg": "DOD-8", "match": "DOD-8", "autocomplete": "DOD-8 1h", "subtitle": "track \"1h\"", "text": {"copy": "DOD-8", "largetype": "DOD-8"}, "valid": true}, {"uid": "NPE-1317", "title": "NPE-1317 Alerts 500", "arg": "NPE-1317", "match": "NPE-1317", "autocomplete": "NPE-1317 1h", "subtitle": "track \"1h\"", "text": {"copy": "NPE-1317", "largetype": "NPE-1317"}, "valid": true}, {"uid": "NPE-1059", "title": "NPE-1059 \u041f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b", "arg": "NPE-1059", "match": "NPE-1059", "autocomplete": "NPE-1059 1h", "subtitle": "track \"1h\"", "text": {"copy": "NPE-1059", "largetype": "NPE-1059"}, "valid": true}]}
[23:56:08.574] youtrack time[Script Filter] Processing complete
[23:56:08.575] youtrack time[Script Filter] Passing output 'DOD-6' to Run Script

 

Script filter:

/usr/bin/env python3 -O issues.py {var:token} {query}

 

Run Script:

echo "{query}"
/usr/bin/env python3 -O track_time.py "{query}"

 

Снимок экрана 2020-07-25 в 23.55.25.png

Share this post


Link to post

Welcome @Nikita Meshchaninov,

 

When asking for help with a Workflow, please upload it somewhere (transfer.sh is a fast solution without ads; drop your Workflow in the box in the middle) as we can’t properly help you without access to it. Debugging can already be hard with access to the code, and you’re asking us to guess yours from a description. There are multiple places where your code or Workflow setup may be going wrong. Without looking at it we’re shooting in the dark.


Read the Reporting Problems with Workflows topic, as it gives a nice overview on how to build an effective report.

Share this post


Link to post
On 7/26/2020 at 6:30 AM, Nikita Meshchaninov said:

This is my problematic workflow

 

You can’t use {var:...} macros in Script boxes. Doesn’t work. If you’re using bash, just use the variable ($YOUTRACK_API_TOKEN). Also, don’t use {query}, use “with input as argv” instead. {query} is a legacy option and is difficult to use because of the escaping (which you have wrong).

 

8 hours ago, Nikita Meshchaninov said:

How to make POST request

 

If you pass a value for the data argument to urllib.request.urlopen(), it will automatically be a POST request.

 

If you need full control over the HTTP method, you need to subclass urllib.request.Request and override its get_method() method.

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...