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.

Data API seems to not be working with strings

See original GitHub issue

I’m having issues getting py.grid_ops.upload to work with strings, it seems to only work with numbers.

This works for me:

grid = Grid([
        Column([1,2,3], 'one'),
        Column([4,5,6], 'two'),
        Column([7,8,9], 'three')
    ])

url = py.grid_ops.upload(grid, filename='test-201706140822', world_readable=False, auto_open=True)

## Run the above first, then run this

py.grid_ops.append_rows([[1,2,3]], grid = grid)

But when I try the exact same thing with Strings, it doesn’t work for me:

grid = Grid([
        Column(['a','b','c'], 'one'),
        Column(['d','e','f'], 'two'),
        Column(['one', 'two', 'three'], 'three')
    ])

url = py.grid_ops.upload(grid, filename='test-201706140820', world_readable=False, auto_open=True)

## Run the above first, then run this

py.grid_ops.append_rows([['g','h','four']], grid = grid)

I’m using python 3.5.2 and plotly 2.0.10

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
charleyferraricommented, Oct 23, 2017

@Kully @cldougl I’m still getting the 500 error when running this on my end, but I also just realized I should have opened this up on streambed rather than plotly.py. So, I’ll reopen the issue there.

0reactions
Kullycommented, Oct 23, 2017

@charleyferrari ^ I just ran the code above and didn’t get an error: the graph was successfully created.

I think we can close the original issue as it is working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: Data must not be a string - python - Stack Overflow
So it seems that the issue is that if files is not json-encoded, then data cannot be json-encoded. However, I need to have...
Read more >
Can't read 'data' object returned … | Apple Developer Forums
The problem I am having is that when I try to parse the response, the 'data' object can't be read. It's not nil...
Read more >
How a Bug In Java String API Messed Up Our Data - Medium
Couple days ago, our team encountered a strange behavior in one of our apps. It seems like some turkish characters of a json...
Read more >
Common API mistakes and how to avoid them - LogRocket Blog
Be stingy with data · Represent upstream data as well-defined objects · Use forward compatible attribute naming · Normalize concepts and attributes.
Read more >
API - STRING Help
STRING has an application programming interface (API) which enables you to get the data without using the graphical user interface of the web...
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