Giter Club home page Giter Club logo

Comments (5)

danielfm avatar danielfm commented on August 28, 2024

Hey! Which is the Python 3 version exactly?

from pybreaker.

AvnerCohen avatar AvnerCohen commented on August 28, 2024

from pybreaker.

danielfm avatar danielfm commented on August 28, 2024

I ran the test cases in my machine with Python 3.7.5 and all tests passed.

If you manage to reproduce the issue in a test case and provide a pull request fixing the issue, I'll be happy to merge it.

from pybreaker.

AvnerCohen avatar AvnerCohen commented on August 28, 2024

@danielfm

  1. Thanks so much for the quick response and checking this out.
  2. Apologies as this was my bad, I wrongly went into the python 3.x direction.

Seems like this happened when I initiated the redis client with auto response decoding:

redis = StrictRedis.from_url(url, {'decode_responses': True})

Dropping this solved the Exception I got:

    state_storage=pybreaker.CircuitRedisStorage(pybreaker.STATE_CLOSED, redis))
  File "/venv/site-packages/pybreaker.py", line 61, in __init__
    self._state = self._create_new_state(self.current_state)
  File "/venv/site-packages/pybreaker.py", line 155, in current_state
    return self._state_storage.state
  File "/venv/site-packages/pybreaker.py", line 512, in state
    state = state_bytes.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

Thanks.

from pybreaker.

danielfm avatar danielfm commented on August 28, 2024

Glad to know. We should probably update the README to document this gotcha so other users don't waste their precious time. :)

from pybreaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.