DLL load failed in xlwings UDF - udf

I am trying to import a user-defined function (UDF, hereafter) through xlwings add-in. That UDF is using a DLL (in the form of .pyd). When I try to import the UDF into excel through xlwings add-in, I am facing a run-time error.
The below is the Visual Basic Error message:
-2147467259(80004005) run-time error
ImportError : DLL load failed
import BS1DCallPut
... File "", line 222, in -call_with_frames_removed
Actually the error is occurring in the part of importing the DLL.(BS1DCallPut.pyd is the name of the DLL)
There's no problem with that DLL elsewhere. For example, I can perfectly import that DLL in a Jupyter notebook and can do some calculations with it, no problem.

Related

Using java in rascal

I have made a java function genImage(List<String lines) which is located in class vis. I am trying to import it into my rascal code, but it won't work. This is the last of my efforts to import it:
#javaClass{visualization.vis}
java void genImage(list[str] lines);
The error I get:
Cannot link method visualization.vis because: visualization.vis.(io.usethesource.vallang.IValueFactory)
Advice: |http://tutor.rascal-mpl.org/Errors/Static/JavaMethodLink/JavaMethodLink.html%7C
The #javaClass tag must point to a fully qualified classname, including the package and the class. It seems it's the class you are missing, right?

xlwings(0.7.0) importing UDF error

Hello,
My problem is that when i try to import an UDF in Ecxel 2013 I receive the error message can be seen on the picture. I have installed xlwings and it works except the UDF importing. Note that i used "xlwings quickstart myproject" so there is no problem with the file names and i also used the sample function so that should be fine as well
Thank you in advance for your help!
I currently don't understand why you get that error, but I should be able to tell you how you can work around it for now:
Open the file udfs.py in the xlwings package and remove the last argument on line 36, i.e. remove , ArgumentDescriptions=argdocs.
The intended functionality of that line (showing function argument description) is currently broken anyway (see here) so hopefully this will be resolved in a future version.

error FS0039: The field, constructor or member 'X' is not defined

I am trying to run my code interactively in an fsx file. I have loaded all the dlls required, I then try to load the required files with #load but when I load the "Utlities.fs" file which depends on a function in the top file "HttpGetExchangeRate.fs" i get the error "Utilities.fs(88,42): error FS0039: The field, constructor or member 'getExchangeRates' is not defined"
Dose the 'getExchangeRates' not get defined when i load "HttpGetExchangeRate.fs"as in the image below or an I missing something?
#load "HttpGetExchangeRate.fs"
#load "Utilities.fs"
open System
open FsCheck
open NUnit.Framework
open HttpClient
InvoiceApp.Http.getExchangeRates "EUR" "USD"
InvoiceApp.Math.convertInvoicingCurrencyToEuro 200.00M "EUR"
Here is an image of the error message
If I understand your scenario correctly, this is due to a bug in how namespaces are handled in FSI. The workaround is to open the namespace you need before #loading the second file
#load "HttpGetExchangeRate.fs"
open InvoiceApp
#load "Utilities.fs"
That should get you unblocked for now, the bug has since been fixed (F# 4.0/VS 2015 will have the fix).
It sounds like you are running into the issue described in this question with implicit modules in fsi.
How to load external F# code and use it in fsi

Compiling jabber-net in Xamarin Studio

I am trying to compile jabber-net in Xamarin Studio so I can use it in a Xamarin.iOS app.
From other searches I have done I am told I need to recompile the source.
From command line I can build the dll, but I have no idea what version of .NET/Mono this is targeting.
This makes a jabber-net.dll and a jabber-net.dll.mdb.
If I add jabber-net.dll to my project, add the reqiured
using jabber.client;
...
...
...
JabberClient client = new JabberClient ();
and try to compile I am told.
/Users/brad/Projects/XMPPChat/XMPPChat/AppDelegate.cs(37,47): error CS0584: Internal compiler error: Could not import type jabber.client.JabberClient' fromjabber-net, Version=2.1.0.702, Culture=neutral, PublicKeyToken=924c5b18328d6f09'
/Users/brad/Projects/XMPPChat/XMPPChat/AppDelegate.cs(37,38): error CS0584: Internal compiler error: Could not import type jabber.client.JabberClient' fromjabber-net, Version=2.1.0.702, Culture=neutral, PublicKeyToken=924c5b18328d6f09'
/Users/brad/Projects/XMPPChat/XMPPChat/AppDelegate.cs(37,38): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
I got no idea what is going on here...
When I try to open any of the .sln's (or include any of the existing projects, even the mono specific project) that came with jabber-net into my solution it will either hang trying to convert the project, or will tell me
The file '/Users/brad/Projects/XMPPChat/JabberNet-2.1.0.710/mono-jabber-net.csproj' could not be loaded.
and will spit out this error.
Any idea where to go from here? :|
Start a new solution from scratch, and add all of the .cs files except those in the test and examples directories. Also make sure you don't have an old version of the .dll around somewhere.

Is SVCUTIL.exe broken or is it the supplier's WSDL?

I am trying to use SVCUTIL from the SDK to generate the common types in several web services. When I try to generate code I get the errors (shown at the bottom)- these suggest the WSDL is broken. However, if I import the service in ServiceReferences Visual Studio does not complain. Is SVCUTIL broken?
The WSDLs are public and are:
http://test.wlr3.net/empws/services/WLR3AssuranceServices?wsdl
http://test.wlr3.net/empws/services/WLR3BillingServices?wsdl
http://test.wlr3.net/empws/services/WLR3DialogueServices?wsdl
http://test.wlr3.net/empws/services/WLR3FulfillmentServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryOrderServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryTroubleReportServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryWorkItemServices?wsdl
http://test.wlr3.net/empws/services/WLR3IssueServices?wsdl
http://test.wlr3.net/empws/services/WLR3ReportingServices?wsdl
http://test.wlr3.net/empws/services/WLR3SecurityServices?wsdl
If you check these out you'll see a lot of common types and several namespaces. I've tried sending these to SVCUTIL to generate the code but it doesn't like the FulfillmentServices and the InventoryServices ones:
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Cannot import invalid schemas. Compilation on the XmlSchemaSet failed.
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:portType[#name='WLR3FulfilmentServices']
Error: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:portType[#name='WLR3FulfilmentServices']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:binding[#name='WLR3FulfillmentServicesHttpBinding']
Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:binding[#name='WLR3FulfillmentServicesHttpBinding']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:service[#name='WLR3FulfillmentServices']/wsdl:port[#name='WLR3FulfillmentServicesHttpPort']
As per comments to the question, there is a small difference in the two problem WSDLs. I compared these with older versions and found there is a type in these based on a virtual base type called "Dto".
This is applied to only two types - one in the Fulfillment Services and one in the Inventory Services, and these are also found in other WSDLs but without the base - the WSDL files are not consistent.
So I can exponerate SVCUTIL here and give the supplier a kick..
Thanks to John Saunders for looking at it

Resources