GithubHelp home page GithubHelp logo

Comments (12)

noisyboiler avatar noisyboiler commented on July 29, 2024

thanks @titilambert
looks like a bug! I'll get this looked at over the coming days. You're welcome to raise a PR too if you'd like to help out?
otherwise I'll sort this out next weekend.
Thanks for bringing this to my attention.

from wampy.

titilambert avatar titilambert commented on July 29, 2024

@noisyboiler I has been trying to fix it since yesterday, without success :(
I will continue to try, I hope you will be quicker than me :)

from wampy.

oddjobz avatar oddjobz commented on July 29, 2024

This vaguely rings a bell, can someone with the problem humour me and tell me what this comes back with?

python -c 'import sys; print(sys.getdefaultencoding())'

from wampy.

titilambert avatar titilambert commented on July 29, 2024

@oddjobz

$ python -c 'import sys; print(sys.getdefaultencoding())'
ascii
$ python3 -c 'import sys; print(sys.getdefaultencoding())'
utf-8

from wampy.

oddjobz avatar oddjobz commented on July 29, 2024

Ok, are you mixing v2/v3 with client / server? If so, that may be the issue, setting both to utf-8 could well sort the problem. Number of ways of doing this, in the past I've change the default encoding in "sitecustomize.py", see this article on stackoverflow

from wampy.

titilambert avatar titilambert commented on July 29, 2024

@oddjobz Sorry, my answer wasn't clear, I'm using python 3 ONLY. I just wanted to give the difference with python 2

from wampy.

oddjobz avatar oddjobz commented on July 29, 2024

Ok, but the issue "looks" like it's trying to decode something in utf-8 that's been encoded in something other than utf-8. (historically this problem is typical of swapping data between v2 and v3 instances) I don't suppose you're specifically changing the encoding anywhere in your code?

from wampy.

noisyboiler avatar noisyboiler commented on July 29, 2024

@titilambert
can you try substituting one of wampy's existing test case calls with the text text='100éfa' to see if this is a wampy problem or not?
I'd like coverage of this regardless so it's something I'll try asap, but you're welcome to raise a PR that adds the coverage with a new test for this - else proves there is a bug!
thanks

from wampy.

titilambert avatar titilambert commented on July 29, 2024

@noisyboiler I just saw, you did it here #44. Did you reproduce the bug ?

from wampy.

noisyboiler avatar noisyboiler commented on July 29, 2024

yes! sorry, there is a bug in payload length with characters beyond standard ascii length.

from wampy.

noisyboiler avatar noisyboiler commented on July 29, 2024

this was a combination of issues

  • sys.getdefaultencoding() being ascii on our machines :(
  • flakey serialisation that can return different things based on the above and the python version
  • giant bug in __len__ implementation
  • random decodes that made things work for ascii but were not properly understood

from wampy.

noisyboiler avatar noisyboiler commented on July 29, 2024

fixed by #44

from wampy.

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.