kylebarron / vscode-jupyter-python

Run automatically-inferred Python code blocks in the VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=kylebarron.vscode-jupyter-python
MIT License
37 stars 3 forks source link

Not working with parentheses #13

Closed GitHunter0 closed 1 year ago

GitHunter0 commented 1 year ago

Consider this example:

import pandas as pd
(
    pd.to_datetime("2011-01-07") \
    # convert to period
    .to_period(freq="W") \
    # convert back to timestamp
    .to_timestamp() 
)

Trying to run the block in parentheses throws this error: image

Thank you

kylebarron commented 1 year ago

That snippet works fine for me. You might need to check that you installed the package correctly?

https://github.com/kylebarron/vscode-jupyter-python/assets/15164633/d2ce3ab6-8b4d-4fce-85bc-1af2fd3b09de

GitHunter0 commented 1 year ago

I restarted VScode and now it's working fine, thank you @kylebarron