Import requests compile error

Two Python novice questions today for the group.

Trying to debug a https request and response.

1st
When trying to debug Script errors, should you read the Textport from bottom to top, or vice versa? ie are the relevant errors and line numbers at the top or bottom-end of your traceback?

2nd
SImply have
import requests
by itself in a Text DAT.
Getting a compile error on this line
from .response import is_fp_closed

This is my complete response. Can any Python experts suggest next troubleshooting steps? Thanks in advance!

  1. The order of operations in a script error is the original caller is at the top and the place where the exception was created is the bottom. This means the bottom end is usually the most relevant, but you can trace up in case the bad data (or whatever) was fed from another call.

  2. I was able to import requests with no problem. Maybe post an example .toe

Thanks. Not sure why but was able to cut and paste the exact same DAT into a new file and no issues.
Is there possibility of some Python naming collision or a Python preference that is document specific?

_importRequestsError.toe (3.5 KB)

This file works fine for me. Is this the problem file for you or the one with no issues?

If you don’t want to send the problem file, maybe start deleting stuff from it and running the script until something fixes the problem.

Hi, do you have any textDAT named “requests” in your network ? Because if so, I think I know that Touchdesigner will try to import it as a module before to look in /sys or external python path.

By the way instead of completely scripting it in python, have a look at the Web Client DAT.

cheers
Markus

Thanks Markus. Will have a look.