FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

on Linux with Mono `FileStream(String, FileMode)` says no constructor matches · Issue #187 · pythonnet/pythonnet · GitHub

Repository navigation

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

Closed

Description

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. ✌️

Activity

  1. tonyroberts commented on Mar 15, 2016

    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).

  2. den-run-ai commented on Mar 23, 2016

    Contributor

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

    #176

  3. JimSEOW commented on Jun 12, 2016

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

  4. den-run-ai commented on Jun 12, 2016

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL