Problem
I was testing the scitacean interface with local instance.
It worked just fine at the office.
And then I came home and continued working on it then I got ConnectError...
Environment
- My local laptop (mac)
- Local instance of scicat (from ScicatLive)
- Connecting to the staging scicat backend wasn't a problem. It also raised an error when the proxy was set
http://localhost manually.
Trouble Shooting Attempts
All the arguments looked fine and when I tried the api with curl it worked fine.
Then I tried hard-coding proxy to be http://localhost in the code block below and it worked...!
And then I removed the hard-coded line and connected to ess VPN and then now it works again.
|
return httpx.request( |
|
method=cmd, |
|
url=url, |
|
content=data.model_dump_json(exclude_none=True) |
|
if data is not None |
|
else None, |
|
params=params, |
|
headers=headers, |
|
timeout=self._timeout.seconds, |
|
) |
Hardcode-fix:
return httpx.request(
method=cmd,
url=url,
content=data.model_dump_json(exclude_none=True)
if data is not None
else None,
params=params,
headers=headers,
timeout=self._timeout.seconds,
proxy="http://localhost"
)
Problem
I was testing the scitacean interface with local instance.
It worked just fine at the office.
And then I came home and continued working on it then I got
ConnectError...Environment
http://localhostmanually.Trouble Shooting Attempts
All the arguments looked fine and when I tried the api with
curlit worked fine.Then I tried hard-coding proxy to be
http://localhostin the code block below and it worked...!And then I removed the hard-coded line and connected to ess VPN and then now it works again.
scitacean/src/scitacean/client.py
Lines 1176 to 1185 in f21e8dd
Hardcode-fix: