Closed CCludts closed 7 years ago
Trying this out, I got a TypeError on first try. specs:
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-2-91c61b03397a> in <module>() ----> 1 get_ipython().run_cell_magic('heat', '', 'def test():\n 50 * 50\n 1 + 2 \n 5 / 4') C:\Users\User\Anaconda3\envs\poker\lib\site-packages\IPython\core\interactiveshell.py in run_cell_magic(self, magic_name, line, cell) 2113 magic_arg_s = self.var_expand(line, stack_depth) 2114 with self.builtin_trap: -> 2115 result = fn(magic_arg_s, cell) 2116 return result 2117 <decorator-gen-126> in heat(self, line, cell) C:\Users\User\Anaconda3\envs\poker\lib\site-packages\IPython\core\magic.py in <lambda>(f, *a, **k) 186 # but it's overkill for just that one bit of state. 187 def magic_deco(arg): --> 188 call = lambda f, *a, **k: f(*a, **k) 189 190 if callable(arg): C:\Users\User\Anaconda3\envs\poker\lib\site-packages\heat.py in heat(self, line, cell) 49 tmp_file = 'ipython_cell_input.py' 50 with open(tmp_file, 'wb') as f: ---> 51 f.write(cell) 52 53 pyheat = PyHeat(tmp_file) TypeError: a bytes-like object is required, not 'str'
I got the same issue.
@PencilBow @mikejseay This is a known issue which is already fixed in v0.0.2 So updating the package version should resolve this for you. That reminds me that I should add a HISTORY file.
Trying this out, I got a TypeError on first try. specs: