Skip to content

Using String.format crashes in python #1641

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
sekkit opened this issue Dec 21, 2021 · 1 comment
Closed

Using String.format crashes in python #1641

sekkit opened this issue Dec 21, 2021 · 1 comment

Comments

@sekkit
Copy link

sekkit commented Dec 21, 2021

Environment

  • Pythonnet version: 3.x
  • Python version: 3.8
  • Operating System: Windows
  • .NET Runtime: net6.0

Details

using

PythonEngine.Initialize();
PythonEngine.Exec("from System import String\nString.Format('{0},{1}', 1, 2)"); //crashes here
int i = Runtime.Py_Main(cmd.Length, cmd);
PythonEngine.Shutdown();

in python, this line crashes
@sekkit sekkit changed the title String.Format("x,y = {0},{1}", Screen.width, Screen.height) using String.format crashes in python Dec 21, 2021
@filmor
Copy link
Member

filmor commented Dec 21, 2021

Please provide a reproducible example and fill out the required environment information. Feel free to reopen once that's done.

@filmor filmor closed this as completed Dec 21, 2021
@sekkit sekkit changed the title using String.format crashes in python Using String.format crashes in python Dec 21, 2021
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

2 participants