Skip to content

impossible to import pyacq and clr #642

Closed

Description

@samuelgarcia

Environment

  • Pythonnet version: 2.3
  • Python version: 3.6.2
  • Operating System: windows10

Details

I am dev of pyacq module.
I need to use clr to access a .NET dll.

I can import pyacq and import clr independantly but not in the same module.

So when:

import pyacq
import clr

I have a non informative (for me) message:

Windows fatal exception: code 0xe06d7363

Current thread 0x00000d18 (most recent call first):
  File "<frozen importlib._bootstrap>", line 205 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 922 in create_module
  File "<frozen importlib._bootstrap>", line 560 in module_from_spec
  File "<frozen importlib._bootstrap>", line 648 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 950 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 961 in _find_and_load
  File "test_pythonnet.py", line 10 in <module>
Windows fatal exception: code 0xe06d7363

Current thread 0x00000d18 (most recent call first):
  File "<frozen importlib._bootstrap>", line 205 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 922 in create_module
  File "<frozen importlib._bootstrap>", line 560 in module_from_spec
  File "<frozen importlib._bootstrap>", line 648 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 950 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 961 in _find_and_load
  File "test_pythonnet.py", line 10 in <module>
Windows fatal exception: code 0xe06d7363

.... very long message ...

I guess that there is a hook on import somewhere but I am totally lost.
Any help would be very usefull.

Activity

  1. samuelgarcia commented on Mar 9, 2018

    @samuelgarcia
    Author

    I have find something:
    This is due to

    import faulthandler
    faulthandler.enable()
    

    in pyacq.

    EDIT:
    So the new issue could be

    import faulthandler
    faulthandler.enable()
    import clr
    
  2. den-run-ai commented on Mar 9, 2018

    @den-run-ai
    Contributor
  3. samuelgarcia commented on Mar 9, 2018

    @samuelgarcia
    Author

    Thank you.
    I don't really get the #449 but does itmeans it will also solve my import faulthandler; faulthandler.enable() ?

  4. den-run-ai commented on Mar 10, 2018

    @den-run-ai
    Contributor

    @samuelgarcia try out the code from this PR and see if it helps:

    #450

  5. filmor commented on Jun 9, 2020

    @filmor
    Member

    This is fixed as far as I can tell.

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