I am trying to use an npm library that also needs to make some api calls, so I need to be able to make post requests from my javascript files. I am using python 3.4.3, django 1.6.6 and node.js 8.10.0.
What I am trying to do is use subprocess.Popen in my routes to call some javascript methods and everything works fine until I make "callback-requests" to return a value from javascript back to python, because when I do, I get "BlockingIOError [Errno 11] write could not complete without blocking".
So I call js from python like this(I simplified the string):
Some things I noticed is that I can always call the function from my bash console without issues and that it sometimes even works when I use my python routes, but most of the time it doesn't. If I was simply not allowed to make a request to django, while my subprocess is still running, then it should never work, right?
This is the best way I could think of to use the library, but suggestions to different approaches are welcome.
Edit: Sorry, the preview in this editor doesn't look like the final version, I don't get it
[edit by admin: code formatting]
Sorry, we have had to rate-limit your feedback sending. Please try again in a few moments...
Thanks for the feedback! Our tireless devs will get back to you soon.