question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot configure default session

See original GitHub issue

docs/advance.rst says to call boto3.setup_default_session to override configuration options.

However, that only works if that call to boto3.setup_default_session occurs before s3path is imported, because the _S3Accessor object is created at module import time, and that’s when it creates the session using default parameters.

The (very hacky) workaround I came up with is to call S3Path._accessor.__init__() after I reconfigure the default session, which seems to work but is not pretty.

Not sure what the ideal solution is to this—perhaps a module-level “set session” function?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Dobatymocommented, Nov 18, 2022

@liormizr Hi sorry please let me test more. I can replicate it in my first environment (databricks), but not in my second (local). So it might be an issue with the dependencies.

EDIT: Please disregard all my comments. The fix for https://github.com/liormizr/s3path/issues/87 is working as intended for me. My boto3 dependency was incompatible with my botocore version. That caused the issues for me.

The lesson here for me is that installing awscli will upgrade the botocore dependency, but not boto3

1reaction
liormizrcommented, Jan 1, 2022

Hi @Alexndrrr ,

I think that we fixed it in the last version. Please see issue #87

can you confirm that you are working on the latest version? (Version: 0.3.3)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't change default session [duplicate] - Unix Stack Exchange
I have Kali-64bit installed in Virtual Box, and I'm simply trying to set the MATE environment as my default for when I reboot/shutdown...
Read more >
Cannot change GDM default session system wide (#5016) · Issues ...
It should be possible to change the system wide default session for new users in the GDM custom.conf config file. In the past...
Read more >
How do I configure the default session for kate - Ask Ubuntu
I know how to start kate with a saved session which has been customized for a particular purpose, but I can't seem to...
Read more >
Configuring Xorg as the default GNOME session - Fedora Docs
Changing the default GNOME session via configuration file. As an alternative, this change can be made by editing a configuration file /etc/gdm/custom.conf ....
Read more >
cannot edit default session (modalSession has been exited ...
I go to "Edit default settings" - "terminal" - "emulation" - and i try to change path or just uncheck checkbox. The i...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found