David Li commited on
Commit
9b84c72
·
1 Parent(s): 6d5a213

fix: errors

Browse files
Files changed (2) hide show
  1. pages/ta.py +1 -0
  2. pages/utils/util.py +2 -1
pages/ta.py CHANGED
@@ -72,6 +72,7 @@ st.header(f"Bollinger Bands")
72
  # if bbands.png exists, display it
73
 
74
  if bbands_img:
 
75
  st.image(bbands_img, caption='Bollinger bands chart')
76
 
77
  donchian_img = build_donchian_img(data, symbol, ran_donchian_name)
 
72
  # if bbands.png exists, display it
73
 
74
  if bbands_img:
75
+ image = PIL.image(io.BytesIO(bytes(bbands_img, "utf-8")))
76
  st.image(bbands_img, caption='Bollinger bands chart')
77
 
78
  donchian_img = build_donchian_img(data, symbol, ran_donchian_name)
pages/utils/util.py CHANGED
@@ -7,7 +7,8 @@ def remove_existing_file(func):
7
  def wrapper(*args, **kwargs):
8
  old_stdin = sys.stdin
9
  sys.stdin = StringIO("y")
10
-
 
11
  sample_dir = root_dir.strip()
12
  # remove /home/codespace/OpenBBUserData/exports/bbands.png already
13
  # get last arg as export
 
7
  def wrapper(*args, **kwargs):
8
  old_stdin = sys.stdin
9
  sys.stdin = StringIO("y")
10
+ stream = os.popen('cd ~ && pwd')
11
+ root_dir = stream.read()
12
  sample_dir = root_dir.strip()
13
  # remove /home/codespace/OpenBBUserData/exports/bbands.png already
14
  # get last arg as export