-
Notifications
You must be signed in to change notification settings - Fork 747
Addresses issue #261 with providing more detail information missing d… #298
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
Conversation
…missing dependencies with ImportError Exceptions
@fdanny can you please add some tests? i.e. you can look at test_import.py file. |
@denfromufa Yup. I can do that. The way I tested it I created a dll that had a missing dependency. I made assure my ImportError Exception contained the specific missing dependency. Is this something that you were thinking? |
Yes, that's right!
…On Thu, Dec 1, 2016, 4:35 PM fdanny ***@***.***> wrote:
@denfromufa <https://github.com/denfromufa> Yup. I can do that. The way I
tested it I created a dll that had a missing dependency. I made assure my
ImportError Exception contained the specific missing dependency. Is this
something that you were thinking?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgZ5YsE4jQuzGb5kQDIvm6IfkH2FZ7Uks5rD0vNgaJpZM4LB5fw>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make TestDependencyAssembly.dll compile as part of project and remove its dependencies before import? Just including a binary without source code is not maintainable.
@denfromufa Is there a location in the solution you want me to put this in TestDependencyAssembly? Is it okay just to check the solution as a reference and treat this dll as a resource. If there are any changes needed then the source code is included to build Also why did my test failed on the Travis CI but passed AppVeyor? It has the following error |
You can just add a new project to solution. Otherwise just compile at That dll loading issue is pretty weird, please share the source code and Here is repeatable issue using Mono C# REPL when using reflection, but not
|
@denfromufa I ran into an issue trying to resolve this. My method will only work if the namespace imported is the same as the assembly name. I have no way of mapping a namespace to an assembly. It looks like when The issue in ScanAssembly is when This doesn't work since it doesn't have all the dependencies so we don't get the namespace mapping. I'm thinking the following maybe
What do you think??? |
@fdanny maybe it is ok without namespace in the error message? but i'm surprised that it is hard to track it down. |
@denfromufa @fdanny is there any help needed for this |
@fdanny needs help tracking down the namespace name in the Exception traceback |
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses pythonnet#261 It is an alternative to pythonnet#298
…ore info when CLR assemblies are failed to be loaded 1. When trying to implicitly load assemblies, and that fails NOT because an assembly is missing, but because loading failed for some reason, emit Python warning. 2. When trying to import a module in our import hook, if the module name is an assembly name, and we fail to load it, and Python also fails to find a module with the same name, add the exceptions we got during the attempt to load it into __cause__ of the final ImportError BREAKING: clr.AddReference will now throw exceptions besides FileNotFoundException. Additional: a few uses of BorrowedReference This addresses #261 It is an alternative to #298
The alternative PR #1076 was merged a while ago. |
This addresses issue #261 to provide more information when there is a missing assembly dependency. The logic basically does the following