-
Notifications
You must be signed in to change notification settings - Fork 752
TypeError when running ReadMe example #554
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
Comments
@fgiaret this has not been released yet, so you need to install pythonnet from master. Download the zip of master branch, unpack it, and then run this commands:
This is simpler with pip+git, but someone broke this recently: #555 |
just checked and the master branch works great, but the
|
It works, great! Thank you! Maybe it's a stupid question, but can I use PythonEngine.Exec or other methods to run python scripts which are defined in a separate file "myscript.py"? I can execute strings of code, but wasn't be able to run scripts yet. |
@fgiaret I see you edited your response with additional question. In future please try to add this as another comment, because no one will get this update in email due to github limitations. Regarding your question - this is possible, have a look at this directory with tests: https://github.com/pythonnet/pythonnet/blob/master/src/embed_tests/TestPyScope.cs |
Ok, thank you very much! |
@fgiaret don't forget to star the repo! |
Hi, I'm trying to embed Python in a C# project with Visual Studio (I'm very new both to C# and GitHub) and I started running the numpy example from the Readme file. After the lines:
"dynamic a = np.array(new List { 1, 2, 3 });
dynamic b = np.array(new List { 6, 5, 4 }, dtype: np.int32);"
I get the following error:
{"TypeError : int() argument must be a string, a bytes-like object or a number, not '0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'"}.
I have the following settings:
I've seen issue #249 reporting the same error, but still wasn't able to fix this. It would be great if someone could help me,
Thank you!
The text was updated successfully, but these errors were encountered: