Evan Hale Posted August 24, 2022 Report Share Posted August 24, 2022 Calling ftrack_api.Session(auto_connect_event_hub=True, **auth) fails at the "query_server_information" action call. It returns a 404 "Resource Not Found" html response. Ftrack is up and running and I can access it fine via the browser. I tried removing the event hub arg which made no difference. I am sure my creds are correct and tested the same call on a different server which worked fine. Logs attached. Server reported error in unexpected format. Raw error was: <!DOCTYPE html> <html> <head> <title>Server Error 404</title> <style type="text/css"> body { background: #282e34; color: white; color: rgba(255, 255, 255, 0.9); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; font-size: 1.2em; font-weight: normal; line-height: 1.6; text-align: center; } h1 { font-size: 2.4m; font-weight: normal; margin-bottom: 0; color: #935ba2; } a { color: #935ba2; } #container { max-width: 600px; margin: 50px auto; } .footer { <div class="footer"> Please contact <a href="mailto:support@ftrack.com">support@ftrack.com</a> if the problem persists. </div> </body> </html> Traceback (most recent call last): File "C:\Users\ehale\.virtualenvs\ftrack-scripts-s-mYXya3\lib\site-packages\ftrack_api\session.py", line 1626, in call result = self.decode(response.text) File "C:\Users\ehale\.virtualenvs\ftrack-scripts-s-mYXya3\lib\site-packages\ftrack_api\session.py", line 1773, in decode return json.loads(string, object_hook=self._decode) File "C:\Python38\lib\json\__init__.py", line 370, in loads return cls(**kw).decode(s) File "C:\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "C:\Users\ehale\.virtualenvs\ftrack-scripts-s-mYXya3\lib\site-packages\ftrack_api\session.py", line 1626, in call result = self.decode(response.text) File "C:\Users\ehale\.virtualenvs\ftrack-scripts-s-mYXya3\lib\site-packages\ftrack_api\session.py", line 1773, in decode return json.loads(string, object_hook=self._decode) File "C:\Python38\lib\json\__init__.py", line 370, in loads return cls(**kw).decode(s) File "C:\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "c:\Users\ehale\.vscode\extensions\ms-python.python-2022.12.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy\__main__.py", line 39, in <module> cli.main() File "c:\Users\ehale\.vscode\extensions\ms-python.python-2022.12.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 430, in main run() File "c:\Users\ehale\.vscode\extensions\ms-python.python-2022.12.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "c:\Users\ehale\.vscode\extensions\ms-python.python-2022.12.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, File "c:\Users\ehale\.vscode\extensions\ms-python.python-2022.12.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "c:\Users\ehale\.vscode\extensions\ms-python.python-2022.12.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "c:\Users\ehale\Repos\ftrack\ftrack-scripts\ftrack-scripts\interactive.py", line 16, in <module> session = ftrack_api.Session(auto_connect_event_hub=True, **auth) File "C:\Users\ehale\.virtualenvs\ftrack-scripts-s-mYXya3\lib\site-packages\ftrack_api\session.py", line 237, in __init__ self._server_information = self._fetch_server_information() File "C:\Users\ehale\.virtualenvs\ftrack-scripts-s-mYXya3\lib\site-packages\ftrack_api\session.py", line 1340, in _fetch_server_information result = self.call([{'action': 'query_server_information'}]) File "C:\Users\ehale\.virtualenvs\ftrack-scripts-s-mYXya3\lib\site-packages\ftrack_api\session.py", line 1634, in call raise ftrack_api.exception.ServerError(error_message) ftrack_api.exception.ServerError: <exception str() failed> Link to comment Share on other sites More sharing options...
Patrick Boucher ftrack Posted August 24, 2022 Report Share Posted August 24, 2022 Hi Evan, You say that you ran the same code: ftrack_api.Session(auto_connect_event_hub=True, **auth) on another computer system and it worked? If that's the case, I'd be surprised if it was the ftrack server itself that was being temperamental. Are both computers on the same network? Is there a proxy or firewall between the failing computer and ftrack? Is this error consistently reproducible (or sporadic)? Thanks, Patrick Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now