Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Pass keyword arguments to TDSCatalog object #303
base: main
Are you sure you want to change the base?
Pass keyword arguments to TDSCatalog object #303
Changes from all commits
fdacebc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this line is doing any good since it sets options after
self.session
is created. I'm pretty sure it's only theget
line below that's doing any good.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is needed for my proxy setup. I use this line to modify the HTTP headers on the request session. If you look inside
http_util.py
, theset_session_options
function adds the keywords I need. Specifically the "User-Agent" parameter in the header.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's the case, you really should call
set_session_options()
before callingcreate_session()
.set_session_options
only affects subsequent calls tocreate_session
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... if I comment out
set_session_options
aftercreate_session()
my code fails from the proxy blocking the request. I expect this.If I move the
set_session_options
line beforecreate_session()
my code fails from the proxy blocking the request on Line 282self.session.get(catalog_url, **kwargs)
. The same failure if comment outset_session_options
. This is unexpected based on what you told me.I'm not going to pretend like I understand what is going on. I just know the code in this PR is the only thing that works for my network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you show the relevant sample of code you're using with siphon? At least the code that creates a
TDSCatalog
up to the point that fails? I feel like there's something I'm missing here... (You can add that in a stand-alone comment below since I think we're getting a little long-winded here)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added another comment with some relevant code samples. Sorry it took so long, ran into some issues with
cftime
package updating and manifesting another bug inpvlib
.