Sebastian Giese Posted July 23, 2023 Share Posted July 23, 2023 Hi all, anybody succeded in creating a network for sending JSON to an REST API? Quote Link to comment
Antonio Landsberger Posted July 26, 2023 Share Posted July 26, 2023 Hi @Sebastian Giese, This should be pretty straight forward. According to this entry, you just need to import requests to work with HTTP requests in python:https://realpython.com/api-integration-in-python/#rest-and-python-consuming-apis Quote Link to comment
Sebastian Giese Posted July 26, 2023 Author Share Posted July 26, 2023 Hi, thank you, i know this python package but can't implement it into marionette. Installation in VWX works, but i can't import it in a node. Quote Link to comment
Antonio Landsberger Posted July 27, 2023 Share Posted July 27, 2023 @Sebastian Giese Please read my answer again and read the linked page again. What is missing in your code is the import part. import requests Put that in the line right before #inputs. Then you should be good to go. Quote Link to comment
Sebastian Giese Posted July 27, 2023 Author Share Posted July 27, 2023 (edited) @Antonio Landsberger I tried every possible position for the string "import requests", none of them works: Part 2: When installing the package with PIP and copy the installed package into the Python Externals Folder, the import works, but the module don't find somehting like "charset normalizer" Edited July 27, 2023 by Sebastian Giese Quote Link to comment
Sebastian Giese Posted August 8, 2023 Author Share Posted August 8, 2023 @Antonio Landsberger Can you help me? Do you have any suggestions? Quote Link to comment
Antonio Landsberger Posted August 8, 2023 Share Posted August 8, 2023 These lines of code work perfectly, when I install the python package in Vectorworks 2023 SP6 with macOS or Windows. files-vwx-png.zip Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.