Skip to content

spaces in python interpreter make UDF import fail #974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fzumstein opened this issue Oct 30, 2018 · 4 comments · Fixed by #1809
Closed

spaces in python interpreter make UDF import fail #974

fzumstein opened this issue Oct 30, 2018 · 4 comments · Fixed by #1809
Labels
Milestone

Comments

@fzumstein
Copy link
Member

see: #766

@fzumstein fzumstein added the bug label Oct 30, 2018
@fzumstein fzumstein changed the title spaces in python interpreter might cause issues for UDFs spaces in python interpreter make UDF import fail - block it for now Mar 7, 2021
@fzumstein fzumstein added this to the 0.23.1 milestone Mar 7, 2021
@fzumstein fzumstein modified the milestones: 0.23.1, 0.23.2 Apr 6, 2021
@fzumstein fzumstein modified the milestones: 0.23.2, 0.23.3 May 6, 2021
@fzumstein fzumstein modified the milestones: 0.23.3, 0.23.4 May 17, 2021
@fzumstein fzumstein modified the milestones: 0.23.4, 0.23.5, 0.23.6 Jun 14, 2021
@fzumstein fzumstein modified the milestones: 0.24.1, 0.24.2, 0.24.3 Jun 27, 2021
@fzumstein fzumstein modified the milestones: 0.24.3, 0.24.4, 0.24.6 Jul 14, 2021
@fzumstein fzumstein modified the milestones: 0.24.6, 0.24.7, 0.24.8 Jul 27, 2021
@fzumstein fzumstein modified the milestones: 0.24.8, 0.24.9 Aug 5, 2021
@fzumstein fzumstein modified the milestones: 0.24.9, 0.24.10 Aug 24, 2021
@JB-AM
Copy link

JB-AM commented Feb 1, 2022

Moving forward on this point would be appreciated.
If I’m not mistaking, it seems that the command would only need an additional "&" before the path to be accepted.
For example, my error message being:
Python process exited before it was possible to create the interface object. Command: cmd.exe /showconsole /K "C:\Program Files\Python39\python.exe" -B -c "import sys, os;import lwings.utils;xlwings.utils.prepare_sys_path(\"C:\\Users\\redacted\\file.xlsm;C:\\Users\\redacted\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\xlwings.xlam;;;;\");import xlwings.server; xlwings.server.serve('{redacted}')" Working Dir: <unspecified> 1000
but copying and pasting it with the additional amp and validating:
cmd.exe /showconsole /K &"C:\Program Files\Python39\python.exe" -B -c "import sys, os;import xlwings.utils;xlwings.utils.prepare_sys_path(\"C:\\Users\\redacted\\file.xlsm;C:\\Users\\redacted\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\xlwings.xlam;;;;\");import xlwings.server; xlwings.server.serve('{redacted}')"
seems to solve the problem, at least manually.

@fzumstein
Copy link
Member Author

fzumstein commented Feb 1, 2022

Thanks for the hint with the &! any reference to that, couldn't find anything online?

@fzumstein fzumstein removed this from the 0.26.1 milestone Feb 1, 2022
@JB-AM
Copy link

JB-AM commented Feb 1, 2022

Not sure where I got the info. If I remember it well, the & indicates to execute the following string, not trying to find some other hidden meaning. And yes, bash is probably more clear than cmd.exe.

@fzumstein fzumstein moved this to Todo in xlwings planner Feb 3, 2022
@fzumstein fzumstein moved this from Todo to In Progress in xlwings planner Feb 4, 2022
Repository owner moved this from In Progress to Done in xlwings planner Feb 4, 2022
@fzumstein fzumstein added this to the 0.26.2 milestone Feb 4, 2022
@fzumstein
Copy link
Member Author

@fzumstein fzumstein changed the title spaces in python interpreter make UDF import fail - block it for now spaces in python interpreter make UDF import fail Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants