Author Topic: SE cannot find the python interpreter  (Read 352 times)

ebbe

  • Community Member
  • Posts: 34
  • Hero Points: 2
SE cannot find the python interpreter
« on: January 27, 2023, 02:01:38 pm »
When I try to debug a python script, SE throws up a message box with the text:
Quote
No python interpreter found at C:\Python311\python.exe.

while I can do this in the Build pane:
Code: [Select]
C:\Users\ebbek\projects\tbdtools\test>which python
C:\Python311\python.EXE

See also the attached picture.

SE Info:
====================================
SlickEdit Pro 2022 (v27.0.1.0 64-bit Qt5)

Serial number: WL461730
Licensed number of users: Single user
License file: C:\ProgramData\slickedit\27\slickedit.lic

Build Date: December 7, 2022   (State file: January 3, 2023)
Emulation: CUA

OS: Windows 10 x64
OS Version: 10.00.0 
Memory: 74% Load, 12034MB/16106MB Physical, 17094MB/20247MB Page File, 4663MB/134217727MB Virtual
Shell Information: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080 (0 0 1920 1080), 1920 x 1200 (2400 -154 2400 1500)

Project Type: Python
Language: .py (Python)
Encoding: ACP (1252)

Installation Directory: C:\Program Files\SlickEdit Pro 27.0.1\ (non-removable drive,NTFS,296943MB free)
Configuration Directory: C:\Users\ebbek\Documents\My SlickEdit Config\27.0.1\ (non-removable drive,NTFS,296943MB free)
Migrated from: C:\Users\ebbek\Documents\My SlickEdit Config\27.0.0\

Hotfixes:
C:\Users\ebbek\Documents\My SlickEdit Config\27.0.1\hotfixes\hotfix_se2701_2_cumulative.zip Revision: 2   (currently loaded)



patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1794
  • Hero Points: 151
Re: SE cannot find the python interpreter
« Reply #1 on: January 27, 2023, 03:11:58 pm »
Seems strange.  The checking code looks right, shouldn't be case sensitive on windows.

Did the message box really have a period at the end of the message?

What does it show in the "value" field if you go to Macro -> Set Macro Variable... and type def_python_exe_path into the "Variable" field?

ebbe

  • Community Member
  • Posts: 34
  • Hero Points: 2
Re: SE cannot find the python interpreter
« Reply #2 on: January 27, 2023, 03:33:09 pm »
No, that period is one I accidentally added when I wrote the text.

The def_python_exe_path macro variable is: " C:\Python311\python.exe" which at first glance seems to be the python interpreter I want to use.

But note the space character at the front of the path string. Remove that and it all works.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1794
  • Hero Points: 151
Re: SE cannot find the python interpreter
« Reply #3 on: January 27, 2023, 04:16:28 pm »
Ok.  I'll check the code that sets and accesses that to make sure it can't get set like that again, and I'll put it in the next hotfix. 

Thanks for the report.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1794
  • Hero Points: 151
Re: SE cannot find the python interpreter
« Reply #4 on: January 31, 2023, 04:02:16 pm »
I checked in a fix that should be in the next hotfix so that shouldn't be possible anymore.  And change the error dialog so the path is quoted, in case any other non-printable characters manage to get in there.   Thanks for the report.

ebbe

  • Community Member
  • Posts: 34
  • Hero Points: 2
Re: SE cannot find the python interpreter
« Reply #5 on: February 01, 2023, 06:41:57 am »
Thank you.