-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html should show word in tooltip when hovering over a dot with a mouse #8
Comments
I'm using latest Chrom on Mac. My guess is that I'm using python 2.7 |
the tooltips on browser are working on https://jasonkessler.github.io/Conventions-Visualization.html |
There are stil some issues with Python 2.x-- the easiest thing may be to use python 3. If you'd still like to use 2, make sure you upload to the latest version of scattertext (0.0.2.4.2). |
I tried re-running my code on py3 and continue to have same problems. Can you direct me to the code which generate the tool tips? |
That's odd. The code is in the showTooltip function of main.js. Could you please post (or email me) a copy of the HTML file that's being generated along with how your calling Scattertext? I'm having trouble replicating the bug. |
on python 3.6 I managed to get the tooltips when using In python 2.7 I get an exception when calling /Users/udi/anaconda2/lib/python2.7/site-packages/scattertext/init.pyc in produce_scattertext_explorer(corpus, category, category_name, not_category_name, protocol, pmi_filter_thresold, minimum_term_frequency, max_terms, filter_unigrams, height_in_pixels, width_in_pixels, max_snippets, max_docs_per_category, metadata, scores, singleScoreMode, sort_by_dist, reverse_sort_scores_for_not_category, use_full_doc, transform, jitter, grey_zero_scores, term_ranker, chinese_mode, use_non_text_features, show_characteristic, word_vec_use_p_vals, max_p_val, term_significance, save_svg_button) /Users/udi/anaconda2/lib/python2.7/site-packages/scattertext/viz/HTMLVisualizationAssembly.pyc in to_html(self, protocol) /Users/udi/anaconda2/lib/python2.7/site-packages/scattertext/viz/VizDataAdapter.pyc in to_javascript(self) /Users/udi/anaconda2/lib/python2.7/json/init.pyc in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, encoding, default, sort_keys, **kw) /Users/udi/anaconda2/lib/python2.7/json/encoder.pyc in encode(self, o) /Users/udi/anaconda2/lib/python2.7/json/encoder.pyc in iterencode(self, o, _one_shot) /Users/udi/anaconda2/lib/python2.7/json/encoder.pyc in default(self, o) TypeError: MY_UNICODE_TEXT is not JSON serializable |
Thanks for finding the issue with Unfortunately, I can't replicate the exception you're seeing. If you can post how you called the function and the data you passed into it, then I'll be able to address the issue. |
I re-run your notebook after changing the python engine from 3 to 2 |
I reran the notebook in Python 3.6, and I can't replicate your error. Which cell are you seeing the error on? What is your environment? Have you made any changes to the notebook? |
Sorry for not being clear enough on last post. I took your original notebook and modified it to work on python 2.7 and then run it on python 2.7 and then on the cell in which you do
|
Hmm. It looks like Pandas' JSON writer is having trouble decoding string format. I really don't envision spending much time supporting Python 2. If you'd like, feel free to take a look at this in the code and submit a PR. |
Since the discussion has drifted to a separate issue and the original bug was fixed, I'm going to close this issue. |
I was able to replicate this in Python 2 last night and figured out the issue. There's a fix coming in the next few minutes, but again, there may be a lot of Python 2 functionality that's broken. |
No description provided.
The text was updated successfully, but these errors were encountered: