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.

boto3 problems after updating to 2.1.x

See original GitHub issue

It seems like I’m unable to get any of my cassettes to playback correctly after upgrading vcrpy from 2.0.1 to 2.1.0. In particular, this is the error I’m running into:

request = <SubRequest '_vcr_marker' for <Function test_datadog_failure_callback>>

    @pytest.fixture(autouse=True)
    def _vcr_marker(request):
        marker = request.node.get_closest_marker('vcr')
        if marker:
>           request.getfixturevalue('vcr_cassette')

../../../Library/Caches/pypoetry/virtualenvs/lattice-py3.7/lib/python3.7/site-packages/pytest_vcr.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../Library/Caches/pypoetry/virtualenvs/lattice-py3.7/lib/python3.7/site-packages/pytest_vcr.py:87: in vcr_cassette
    with vcr.use_cassette(vcr_cassette_name, **kwargs) as cassette:
../../../Library/Caches/pypoetry/virtualenvs/lattice-py3.7/lib/python3.7/site-packages/vcr/cassette.py:96: in __enter__
    return next(self.__finish)
../../../Library/Caches/pypoetry/virtualenvs/lattice-py3.7/lib/python3.7/site-packages/vcr/cassette.py:64: in _patch_generator
    for patcher in CassettePatcherBuilder(cassette).build():
../../../Library/Caches/pypoetry/virtualenvs/lattice-py3.7/lib/python3.7/site-packages/vcr/patch.py:123: in _build_patchers_from_mock_triples
    for args in mock_triples:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <vcr.patch.CassettePatcherBuilder object at 0x10780b5c0>

    @_build_patchers_from_mock_triples_decorator
    def _boto3(self):

        try:
            # botocore using awsrequest
            import botocore.awsrequest as cpool
        except ImportError:  # pragma: no cover
            try:
                # botocore using vendored requests
                import botocore.vendored.requests.packages.urllib3.connectionpool as cpool
            except ImportError:  # pragma: no cover
                pass
            else:
                from .stubs import boto3_stubs
                yield self._urllib3_patchers(cpool, boto3_stubs)
        else:
            from .stubs import boto3_stubs
            log.debug("Patching boto3 cpool with %s", cpool)
>           yield cpool.AWSHTTPConnectionPool, 'ConnectionCls', boto3_stubs.VCRRequestsHTTPConnection
E           AttributeError: module 'botocore.awsrequest' has no attribute 'AWSHTTPConnectionPool'

../../../Library/Caches/pypoetry/virtualenvs/lattice-py3.7/lib/python3.7/site-packages/vcr/patch.py:210: AttributeError

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
fgblomqvistcommented, Sep 18, 2019

Sure, but what I’m arguing is that this is not vcrpy’s fault. You should open an issue with Airflow and tell them to update their boto3 (1.7.x is quite old), and until they do, you’re just gonna have to run an older version of vcrpy. If all Python libraries had to support really old versions of dependencies just because some libraries refuse to update, the ecosystem would never get anywhere.

1reaction
maxcountrymancommented, Sep 17, 2019

Alright. At the very least the >= specifier should probably be used since VCR breaks with too low of a version of boto3. But yeah thanks!

Our lock is requiring this: boto3 = ">=1.7.0,<1.8.0" which is believe is tied directly to Airflow.

We’re currently on Airflow ^1.10.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading notes — Boto3 Docs 1.26.35 documentation - AWS
Notes to refer to when upgrading boto3 versions. 1.9.0¶. What changed¶. The boto3 event system was changed to emit events based on the...
Read more >
python 3.x - Omega2+ openwrt boto3 issues - Stack Overflow
I am trying to connect my onion omega2+ to send data payloads to my aws dynamodb. I have my credentials setup in .aws...
Read more >
Troubleshooting AWS CLI errors - AWS Command Line Interface
If you're having issues with your terminal processing JSON formatting, ... command should be structured, see the AWS CLI version 2 reference guide...
Read more >
Python, Boto3, and AWS S3: Demystified - Real Python
Know how to avoid common pitfalls when using Boto3 and S3; Understand how to set up your data from the start to avoid...
Read more >
boto · PyPI
To assist users who still depend on Boto and cannot immediately switch over, we will be triaging and addressing critical issues and PRs...
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