I am hoping someone can help me out. I’ve been trying to use the requests module with ironpython to post data to our API. Originally I was just using CPython which works great, but I am hoping to take advantage of the wpf forms @eirannejad builtin to pyrevit. I have full_frame set to true in the bundle metadata.
When I run this with CPython I get 200 codes for both, but when I run it with ironpython I get a 200 code for the first request and an exception with the second.
IOError: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
Ok great, thanks. Do you know how you can switch ironpython engine/version outside of the pyrevit settings? Using the CLI perhaps? That setting seems disabled for me, as seen in the screenshot of my other post.
pyrevit attach (-h | --help)
pyrevit attach <clone_name> (default | <engine_version>) (<revit_year> | --installed | --attached) [--allusers] [--log=<log_file>]
Arguments & Options:
<clone_name> Name of target clone
<revit_year> Revit version year e.g. 2019
<engine_version> Engine version to be used e.g. 277
latest Use latest engine
dynamosafe Use latest engine that is compatible with DynamoBIM
--installed All installed Revits
--attached All currently attached Revits
--allusers Attach for all users
no idea why it is disabled in your install, @eirannejad would know
I looked in the issues on the github and did not find anything related
I came across this post but for another reason - import requests module not found error.
In case others run into this issue of module not found In ironpython 3.4 ,
I was able to resolve by making sure search path for modules has entry for correct site-packages
Maybe I didnt follow all the installation steps correctly - not sure but the path to site-packages was missing fixed be code below