Skip to content

on Linux with Mono FileStream(String, FileMode) says no constructor matches #187

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
mikofski opened this issue Mar 15, 2016 · 4 comments
Closed

Comments

@mikofski
Copy link

Ubuntu-14.04LTS
Python-2.7
Python.NET latest development branch with #119 patch for setup.py
Mono-4.0.12 (Xamarin)

I know that Python.NET isn't officially supported on Linux with mono, but I thought for posterity I should report this and maybe I or someone else will find a fix for at a later date.

>>> import clr
>>> clr.AddReference("System.IO")
>>> from System.IO import FileStream, FileMode
>>> fs = FileStream('myfile.net', FileMode.Open)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-22-0478243743b3> in <module>()
----> 1 fs = FileStream('myfile.net', FileMode.Open)

TypeError: no constructor matches given arguments

The same exact commands work on IronPython, so I don't think it's mono. I think the way to solve this is to rebuild pythonnet with debugging and attach GDB to the python process and step through the .NET code. If/when I do this, I will update this ticket. ✌️

@tonyroberts
Copy link
Contributor

mono/linux is supported, so what you're trying to do is perfectly reasonable! There were some changes to the type conversion that may have broken this - try pull the #176 PR and see if that helps (it may not get merged in exactly its current state, but some fix like the one in there is needed).

@den-run-ai
Copy link
Contributor

@mikofski this special case for enums has been merged to default develop branch. let us know if it does not work:

#176

@JimSEOW
Copy link

JimSEOW commented Jun 12, 2016

please share links which suggest it is possible to use python.NET in xamarin mono

@den-run-ai
Copy link
Contributor

@JimSEOW can you open a separate issue for this? Mono from Xamarin is mainly used on Android and iOS, so mention your platform of interest.

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

4 participants