You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
firstly, thank you for the simple but great extension!
I'm running into an issue with Jupyter when trying to run the below python file using your extension. The Jupyter log is also below.
Steps to reproduce:
pip install matplotlip
step through all inferred code blocks with shift + enter
generate_cvbg_img.py:
"""Generate a background image for a CV with two colors."""importmatplotlib.pyplotaspltimportosdefgenerate_image(file_path, left_color, right_color, left_width_percentage, a4_width_inch=8.27, a4_height_inch=11.69):
fig, ax=plt.subplots(figsize=(a4_width_inch, a4_height_inch))
ax.fill_betweenx([0, 1], 0, left_width_percentage, color=left_color, transform=ax.transAxes)
ax.fill_betweenx([0, 1], left_width_percentage, 1, color=right_color, transform=ax.transAxes)
ax.axis('off')
plt.savefig(file_path, bbox_inches='tight', pad_inches=0)
plt.close()
if__name__=="__main__":
# Page size setupa4_width_inch=8.27a4_height_inch=11.69left_width_percentage=0.26# width of the left color in percentageright_color='#ffffff'# create outputs folder if it does not existifnotos.path.exists('outputs'):
os.makedirs('outputs')
# Generate image with color #00162bleft_color_0='#00162b'file_path_00162b=f'outputs/cvbg_{left_color_0[1:]}.png'generate_image(file_path_00162b, left_color_0, right_color, left_width_percentage, a4_width_inch, a4_height_inch)
# Generate image with color #011d59left_color_1='#011d59'file_path_011d59=f'outputs/cvbg_{left_color_1[1:]}.png'generate_image(file_path_011d59, left_color_1, right_color, left_width_percentage, a4_width_inch, a4_height_inch)
print(f"Images saved as {file_path_00162b} and {file_path_011d59}")
Jupyter log:
14:55:28.206 [info] Generated code for 1 = <ipython-input-1-a0d2faabd9e9> with 1 lines
14:55:29.719 [info] Generated code for 2 = <ipython-input-2-543d7f3a58ae> with 1 lines
14:55:30.662 [info] Generated code for 3 = <ipython-input-3-d010b93169df> with 7 lines
14:55:32.562 [error] Error in execution (get message for cell) Error: Illegal value for `line`
at u.t (e:\Programme\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:961)
at Object.lineAt (e:\Programme\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:90)
at XT.generateCodeImpl (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:332:2855)
at XT.generateCode (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:332:1804)
at wf.generateCodeAndAddMetadata (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:355:3566)
at wf.createExecutionPromise (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:355:711)
14:55:32.562 [warn] DataScience Error Error: Illegal value for `line`
at u.t (e:\Programme\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:961)
at Object.lineAt (e:\Programme\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:90)
at XT.generateCodeImpl (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:332:2855)
at XT.generateCode (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:332:1804)
at wf.generateCodeAndAddMetadata (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:355:3566)
at wf.createExecutionPromise (c:\Users\~\.vscode-insiders\extensions\ms-toolsai.jupyter-2024.6.2024062802-win32-x64\dist\extension.node.js:355:711)
The text was updated successfully, but these errors were encountered:
This is a duplicate of #6. It only happens when you run shift+enter on the last line of the text editor. I've never gotten around to actually fixing it, but I should look at #11
Hi Kyle,
firstly, thank you for the simple but great extension!
I'm running into an issue with Jupyter when trying to run the below python file using your extension. The Jupyter log is also below.
Steps to reproduce:
pip install matplotlip
shift
+enter
generate_cvbg_img.py:
Jupyter log:
The text was updated successfully, but these errors were encountered: