Giter Site home page Giter Site logo

Comments (4)

mvanderkamp avatar mvanderkamp commented on July 22, 2024 1

Ooh actually to be even more precise it's something to do with the newline characters. If I had to guess I'd say that urwid has a bug with how it handles special characters.

What I did:

import random
floats = [random.random() for _ in range(512)]
columns = [floats[i::5] for i in range(5)]
rows = list(zip(*columns))
strings = '\n'.join(', '.join(str(x) for x in row) for row in rows)

This skips the numpy dependency and, by comparing how the different variables behave, you can see that it's really only when you enable line wrapping and use the str stringifier on the strings variable that urwid hits a traceback.

I'm not sure why str is the one to trigger it instead of repr. Probably something to do with how I included the newlines.

from pudb.

mvanderkamp avatar mvanderkamp commented on July 22, 2024

I managed to reproduce, but with the following additions:

  • repr is the default stringifier
  • line wrapping is enabled for the variable display

from pudb.

mvanderkamp avatar mvanderkamp commented on July 22, 2024

Anyway this looks more like an urwid than pudb bug, and I suspect it's got something to do with the way numpy formats its strings, since I can't reproduce just with a long regular python list of floating point numbers.

from pudb.

mvanderkamp avatar mvanderkamp commented on July 22, 2024

If it helps, just a single one of those numpy arrays is sufficient to trigger the traceback for me.

from pudb.

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.