Skip to content
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

Scripts fail to edit/open in IDLE #89

Closed
U5KUN opened this issue Aug 14, 2023 · 20 comments
Closed

Scripts fail to edit/open in IDLE #89

U5KUN opened this issue Aug 14, 2023 · 20 comments

Comments

@U5KUN
Copy link

U5KUN commented Aug 14, 2023

I can't edit script value.

2023-08-14.15.34.55.mov
@zorgiepoo
Copy link
Owner

zorgiepoo commented Aug 15, 2023

You should be able to double click on the "#Edit Me" value, but it's not working for you for some reason. Are there any logs for Bit Slicer in the Console app? (you can search for Console using Spotlight).

Also you can try to go into Bit Slicer's Settings/Preferences (in the Bit Slicer menu in the menubar). Go to Scripts tab, and try modifying the default script editor. Maybe that will help. By default it should try to open the .py files in your default text editor you have set for Python (maybe that editor is just not doing anything?)

The scripting guide is over here https://github.com/zorgiepoo/Bit-Slicer/wiki/Introduction-to-Scripting

@ttuleyb
Copy link

ttuleyb commented Aug 20, 2023

I get the same exact issue

@zorgiepoo
Copy link
Owner

Did you try the above? I cannot do much without any sort of diagnostics/ hints here.

@ttuleyb
Copy link

ttuleyb commented Aug 20, 2023

@ttuleyb
Copy link

ttuleyb commented Aug 20, 2023

The debug logs are empty:

03:20:29: Cleaning up..
03:20:30: Initialization..
03:20:31: Cleaning up..
03:20:31: Initialization..
03:20:51: Initialization..

@ttuleyb
Copy link

ttuleyb commented Aug 20, 2023

I'm using 1.7.12 (1152)

@zorgiepoo
Copy link
Owner

Are there any logs for Bit Slicer in the Console app? (you can search for Console using Spotlight).

The Console app is a separate app on your system you can find using Spotlight. Filter for Bit Slicer and let me know if any errors show up.

Also you can try to go into Bit Slicer's Settings/Preferences (in the Bit Slicer menu in the menubar). Go to Scripts tab, and try modifying the default script editor. Maybe that will help. By default it should try to open the .py files in your default text editor you have set for Python (maybe that editor is just not doing anything?)

Please try this too.

@zorgiepoo
Copy link
Owner

What macOS version are you running as well?

@ttuleyb
Copy link

ttuleyb commented Aug 20, 2023

Changing editor to VSCODE fixed it! Thanks.

@zorgiepoo
Copy link
Owner

zorgiepoo commented Aug 20, 2023

Do you have any idea what app is set as the default handler for .py files on your system? I am curious which app this was not working for.

@ttuleyb
Copy link

ttuleyb commented Aug 20, 2023

Screenshot 2023-08-20 at 03 31 11

One of those two (I think they are the same app anyway)
I have like 11 different python installations on my mac. Defualt one should be 3.8.16

@ttuleyb
Copy link

ttuleyb commented Aug 20, 2023

It might be a good idea to pick literally any other editor (not textedit) because if people have them installed they usually prefer them anyways

@zorgiepoo
Copy link
Owner

Looking at the icon, the problem here seems to be IDLE not TextEdit. I will have to try installing IDLE or a custom python installation myself to see if I can reproduce.

@U5KUN
Copy link
Author

U5KUN commented Aug 20, 2023

I use IDLE too.

@ttuleyb
Copy link

ttuleyb commented Aug 21, 2023

It could be a good idea to warn to user to pick a different ide if edit is disabled on a script for whatever reason

@U5KUN
Copy link
Author

U5KUN commented Aug 24, 2023

can't edit script with Cursor.

@U5KUN
Copy link
Author

U5KUN commented Aug 24, 2023

CotEditor too.

@U5KUN
Copy link
Author

U5KUN commented Sep 3, 2023

I can do it with Cursor.
Open setting and change "Edit Script with".

@U5KUN U5KUN closed this as completed Sep 3, 2023
@zorgiepoo
Copy link
Owner

I can only reproduce the issue with IDLE. IDLE doesn't seem to like opening files through it using NSWorkspace. And we don't get any sort of failure on our end because the app actually does open but shortly terminates. This app has a very hacky way of getting itself launched. Nothing I can do here maybe short of filing a bug to them.

@zorgiepoo zorgiepoo reopened this Sep 4, 2023
@zorgiepoo zorgiepoo changed the title How to edit script? Scripts fail to edit/open in IDLE Sep 4, 2023
@zorgiepoo
Copy link
Owner

zorgiepoo commented Sep 4, 2023

Actually issue seemed to be how some python related env variables were getting passed down interfering with IDLE's configuration. Fix is made in d783566 (for macOS 10.15+ at least)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants