Jump to content

python reqests lib


papsphilip

Recommended Posts

i am trying to use requests inside a python node

when i hit the save button an error message keeps popping up

Traceback (most recent call last):
  File "Sop/python/save", line 1, in <module>
  File "<string>", line 47, in Save
  File "<string>", line 21, in get_img
NameError: global name 'response' is not defined

Capture.JPG

Link to comment
Share on other sites

23 hours ago, anim said:

is it because you havent defined 'response' variable but trying to use it?

I'm not familiar with requests module, but your code proably should be


response = requests.get(url)

instead of just 


requests.get(url)

 

total noob mistake, thank you very much. still learning

Link to comment
Share on other sites

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.

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...