Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 Unauthorized #4

Open
JosephLeon13 opened this issue Apr 13, 2020 · 2 comments
Open

401 Unauthorized #4

JosephLeon13 opened this issue Apr 13, 2020 · 2 comments

Comments

@JosephLeon13
Copy link

JosephLeon13 commented Apr 13, 2020

RS = SSRS(
ReportService = 'https://www.qscorpio.com:1443/ReportServer/ReportService2005.asmx?wsdl',
ReportExecution = 'https://www.qscorpio.com:1443/ReportServer/ReportExecution2005.asmx?wsdl',
user = '****',
key_password = '*****'
)

When I run the script I receive this error
raise TransportError(str(e), e.code, e.fp) suds.transport.TransportError: HTTP Error 401: Unauthorized

Traceback (most recent call last): File "/home/chaos/Projects/Flask/flask-test/env/bin/flask", line 10, in <module> sys.exit(main()) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/flask/cli.py", line 966, in main cli.main(prog_name="python -m flask" if as_module else None) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/flask/cli.py", line 586, in main return super(FlaskGroup, self).main(*args, **kwargs) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/click/decorators.py", line 73, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/flask/cli.py", line 848, in run_command app = DispatchingApp(info.load_app, use_eager_loading=eager_loading) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/flask/cli.py", line 305, in __init__ self._load_unlocked() File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/flask/cli.py", line 330, in _load_unlocked self._app = rv = self.loader() File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/flask/cli.py", line 392, in load_app app = locate_app(self, import_name, None, raise_if_not_found=False) File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/flask/cli.py", line 240, in locate_app __import__(module_name) File "/home/chaos/Projects/Flask/flask-test/flaskr/app.py", line 6, in <module> from clients.client_routes import client_bp, hello File "/home/chaos/Projects/Flask/flask-test/flaskr/clients/client_routes.py", line 13, in <module> key_password = '****' File "/home/chaos/Projects/Flask/flask-test/env/lib/python3.7/site-packages/SSRS/__init__.py", line 47, in __init__ msg = "Error during connection: %s" % e.fault.faultstring AttributeError: 'TransportError' object has no attribute 'fault'

any idea what would be going on here?

@Ol1BoT
Copy link

Ol1BoT commented Jun 12, 2020

Had the same issue. Try using the server name rather than the domain.

source: https://forums.asp.net/t/1606942.aspx

@Ol1BoT
Copy link

Ol1BoT commented Jun 22, 2020

Just wanted to follow up in case anyone else has found the way here.

If you are using Windows Auth (NTLM) then the 401 issue is a little more complicated and it is actually an issue with the ntlm3 python library (which is used by the python suds library). Issue and work around found here:

cackharot/suds-py3#55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants