bugbar chokes on library

30 views
Skip to first unread message

Salaami Medico

unread,
May 28, 2015, 11:16:40 AM5/28/15
to beewar...@googlegroups.com
Succesfully installed bugjar on win8.1 running anaconda. Invoking
bugjar hello.py succesfully starts the debugger.
I also have installed bokeh
http://bokeh.pydata.org/en/latest/
I navigated to the Examples/bokeh/charts directory and invoked
bugjar heatmap.py
and got this in the console:

C:\Anaconda\Examples\bokeh\charts>bugjar heatmap.py
Traceback (most recent call last):
  File "C:\Anaconda\Scripts\bugjar-net-script.py", line 9, in <module>
    load_entry_point('bugjar==0.1.0', 'console_scripts', 'bugjar-net')()
  File "C:\Anaconda\lib\site-packages\bugjar\main.py", line 153, in net
    net_run(options.hostname, options.port, filename, *options.args)
  File "C:\Anaconda\lib\site-packages\bugjar\net.py", line 601, in run
    debugger.interaction(None, t)
  File "C:\Anaconda\lib\site-packages\bugjar\net.py", line 252, in interaction
    client, addr = self.socket.accept()
  File "C:\Anaconda\lib\socket.py", line 202, in accept
    sock, addr = self._sock.accept()
KeyboardInterrupt
Listening on 0.0.0.0:3742 for a bugjar client
Got connection from ('127.0.0.1', 54717)

So, bokeh is a library and the code for heatmap.py is this:

import pandas as pd
from bokeh.charts import HeatMap
from bokeh.palettes import Purples9 as palette
from bokeh.plotting import output_file, show, VBox
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-2]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
# bokeh magic
hm1 = HeatMap(df3, palette=palette, title="categorical heatmap, pd_input", height=400, width=1000)
hm_data = df3.values.T
hm2 = HeatMap(hm_data, palette=palette, title="Unemployment (Array)", xlabel='Years since 1948', ylabel='Months', height=400, width=1000)
simple_df = pd.DataFrame(
    {'apples':[4,5,8,12,4], 'pears':[6,5,4,8,7], 'bananas':[1,2,4,8,12]},
    index=['2009', '2010', '2011', '2012', '2013']
)
hm3 = HeatMap(simple_df, palette=palette, title="Fruit comsumption per year", height=400, width=1000)
output_file("heatmap.html")
show(VBox(hm1, hm2, hm3))

when I just run python heatmap.py I get a nice chart so I know the code is working. 
What is bugjar missing?

Russell Keith-Magee

unread,
May 28, 2015, 7:49:13 PM5/28/15
to beewar...@googlegroups.com

Hi Salaami,

Unfortunately, bugjar isn't really ready for production use at this point - it's a proof of concept, but it's still very primitive and bug-prone. 

In this particular case, it looks like heat_map.py is doing something with signals that is competing with bugjars's own signals, but I'd need to spent a lot of time with the code to work out what is going on. 

Yours,
Russ Magee %-)

Reply all
Reply to author
Forward
0 new messages