calebweinreb / SNUB

MIT License
24 stars 4 forks source link

Update trace.py - parenthesis fix #38

Closed ralphpeterson closed 6 months ago

ralphpeterson commented 6 months ago

Got the error below after adding some traceplots to my project. I found that the "rb" argument is used by open() rather than pickle.load(). After patching this, things worked fine!

Traceback (most recent call last):
  File "C:\Users\rep359\Anaconda3\envs\snub\lib\site-packages\snub\gui\main.py", line 407, in open
    self.load_project(project_dir)
  File "C:\Users\rep359\Anaconda3\envs\snub\lib\site-packages\snub\gui\main.py", line 434, in load_project
    project_tab = ProjectTab(project_directory)
  File "C:\Users\rep359\Anaconda3\envs\snub\lib\site-packages\snub\gui\main.py", line 83, in __init__
    self.trackStack = TrackStack(config, self.selected_intervals)
  File "C:\Users\rep359\Anaconda3\envs\snub\lib\site-packages\snub\gui\stacks\track.py", line 49, in __init__
    track = HeadedTracePlot(config, **props)
  File "C:\Users\rep359\Anaconda3\envs\snub\lib\site-packages\snub\gui\tracks\trace.py", line 348, in __init__
    trace = TracePlot(config, **kwargs)
  File "C:\Users\rep359\Anaconda3\envs\snub\lib\site-packages\snub\gui\tracks\trace.py", line 81, in __init__
    self.data = pickle.load(open(data_path), "rb")
calebweinreb commented 6 months ago

Nice catch!