Skip to content

encoding issues #24

Description

@lmeyerov

See notebook etl/BestbuySignals.ipynb at end (trying to merge in community detection):

UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-33-2dbdcded78d1> in <module>()
----> 1 g.plot(graph=subset, nodes=nodes.merge(nodeid, on='id').drop_duplicates('id'))

/usr/local/lib/python2.7/site-packages/graphistry/plotter.pyc in plot(self, graph, nodes)
     93             util.error('Expected Pandas dataframe or Igraph graph.')
     94 
---> 95         json_dataset = json.dumps(dataset, ensure_ascii=False).encode('utf8')
     96         dataset_name = pygraphistry.PyGraphistry._etl(json_dataset)
     97         viz_url = pygraphistry.PyGraphistry._viz_url(dataset_name, self.url_params)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 10132878: ordinal not in range(128)

Also, unclear why I had to add the drop_duplicates() when going pandas->igraph->pandas.

Activity

  1. thibaudh commented on Aug 9, 2015

    @thibaudh
    Contributor

    According to Slack, you are using version 0.0.14. Can you reproduce on master?

    On Aug 9, 2015, at 4:12 PM, lmeyerov [email protected] wrote:

    See notebook etl/BestbuySignals.ipynb at end (trying to merge in community detection):

    UnicodeDecodeError Traceback (most recent call last)
    in ()
    ----> 1 g.plot(graph=subset, nodes=nodes.merge(nodeid, on='id').drop_duplicates('id'))

    /usr/local/lib/python2.7/site-packages/graphistry/plotter.pyc in plot(self, graph, nodes)
    93 util.error('Expected Pandas dataframe or Igraph graph.')
    94
    ---> 95 json_dataset = json.dumps(dataset, ensure_ascii=False).encode('utf8')
    96 dataset_name = pygraphistry.PyGraphistry._etl(json_dataset)
    97 viz_url = pygraphistry.PyGraphistry._viz_url(dataset_name, self.url_params)

    UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 10132878: ordinal not in range(128)
    Also, unclear why I had to add the drop_duplicates() when going pandas->igraph->pandas.

    —
    Reply to this email directly or view it on GitHub #24.

  2. lmeyerov commented on Aug 10, 2015

    @lmeyerov
    ContributorAuthor

    Yep, still happening. Now earlier: g.plot(subset, nodes=nodeid) on cell 6.

  3. lmeyerov commented on Aug 10, 2015

    @lmeyerov
    ContributorAuthor

    I think I'm on master. Is there a way to check / print version? (Maybe that should be in the lib.)

  4. lmeyerov commented on Aug 10, 2015

    @lmeyerov
    ContributorAuthor

    Also hitting Cell 5 of rawdata/polishparliment/Polish%20Parliament%20Votes.ipynb

  5. lmeyerov commented on Aug 10, 2015

    @lmeyerov
    ContributorAuthor

    (Still open)

  6. lmeyerov commented on Aug 10, 2015

    @lmeyerov
    ContributorAuthor

    (both open)

  7. added a commit that references this issue on Mar 13, 2022
    b4b95f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions