Up until now, my Rorativa (latest stable version - 1.6.1) has been working beautifully in my MVC project.
My code was originally
return new Rotativa.ActionAsPdf(string.Format("PrintPage/{0}", id));
and I get a nice happy pdf version of my page
But now I want to do some more advances stuff, so I do this
return new Rotativa.ActionAsPdf(string.Format("PrintPage/{0}", id))
{
CustomSwitches = "--print-media-type --footer-html " + Url.Action("Footer",id)
};
and then when I do I get this error
Qt: Untested Windows version 6.2 detected!
QMetaObject::invokeMethod: No such method WebCore::SocketStreamHandlePrivate::socketSentData()
Error: Failed loading page http:///Invoice/Footer?page=1§ion=Account Queries VAT No.
0&title=Ben Dover-Invoice No:
A0120852&subsection=MATERIALS&frompage=1&subsubsection=&topage=2&doctitle=Ben Dover-Invoice No:
A0120852&webpage=http://localhost:2066/Invoice/PrintPage/386&time=01:01:59 PM&date=2015/01/06
(sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed loading page http:///Invoice/Footer?page=2§ion=Account Queries VAT No.
0&title=Ben Dover-Invoice No: A0120852&subsection=TOTAL R
1รก850.70&frompage=1&subsubsection=&topage=2&doctitle=Ben Dover-Invoice No:
A0120852&webpage=http://localhost:2066/Invoice/PrintPage/386&time=01:01:59 PM&date=2015/01/06
(sometimes it will work just to ignore this error with --load-error-handling ignore)
QPaintDevice: Cannot destroy paint device that is being painted
pure virtual method called
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called without an active exception
I tried following the suggestion and add --load-error-handling ignore this removes the error, but my footer doesn't load
We have the same problem on the project. Additionally report work on localhost but not in production server. Solution for the problem is to add route, so the static IP address will be represented as local on the server.
http://technet.microsoft.com/en-us/library/cc757323%28v=ws.10%29.aspx
On some servers that can not be added for some reasons so we add Microsoft loopback adapter to do the same thing.
https://4sysops.com/archives/how-to-install-loopback-adapter-in-windows-8/
After that everything works perfectly.
Related
cable_ready 4.5.0
rails 6.1.4.1
ruby 3.0.2p107
This is a simple example from the basic tutorial (https://www.youtube.com/watch?v=F5hA79vKE_E) I suspect the error I am getting is because either cable_ready or rails evolved a little and created a tiny incompatibility.
I get this error in the JS console:
It is triggered when in my controller I ask cable ready to:
cable_ready["timeline"].console_log(message: "***** cable ready post created")
Which leads to my timeline_channel to:
received(data) {
console.log("******** Received data:", data.operations)
if (data.cableReady) CableReady.perform(data.operations)
}
My interpretation is perform causes this line in cable_ready.js line 13:
operations.forEach(function (operation) {
if (!!operation.batch) batches[operation.batch] = batches[operation.batch] ? ++batches[operation.batch] : 1;
});
Is finding something in the received data that it doesn't like.
That's where my trail ends. Can someone see what I am doing wrong, or tell me what other code you'd like me to include?
Solution: downgrade the version of the cable_ready javascript library.
I previously (maybe a year ago) did this tutorial using CableReady 4.5, Ruby 2.6.5 and Rails 6.0.4 and it worked like a charm back then as well as today.
But today, I tried this tutorial again on a duplicate project--same versions of CR, Ruby, and Rails and now I get java console errors similar to yours.
TypeError: undefined is not a function (near '...operations.forEach...')
perform -- cable_ready.js:13
received -- progress_bar_channel.js:8
I looked at the output of yarn list and saw that cable_ready was version 5.0.0-pre8 on the bad project and it was 5.0.0-pre1 on the good project. The downgrade could be accomplished with yarn add cable_ready#^5.0.0-pre1 in the bad project folder and now both projects work.
FYI for other newbies like me trying to understand how CableReady works: This tutorial gives another example of CableReady, and was also fixed the same way.
I was learning a bit about how Machine Learning works and eventually built a small C# application because of a tutorial I was watching where a model determines what species of Bee a particular bee IS. It works well in the C# application, but I was also developing an app project that had picture taking capabilities in mind so I thought "No reason the model I saved in the first project can't work in the second, right?". Apparently there is a reason why it can't work because here is the necessary code to view in the app project:
MLContext m_mlObj;
DataViewSchema m_modelSchema;
ITransformer m_loadedTrainedModel;
var folderPath = DependencyService.Get<IFileSystem>().GetExternalStorage();
var fileDir = Path.Combine(folderPath, "trainedModel.zip");
bool testValue = File.Exists(fileDir);
if(testValue)
{
Console.WriteLine("File in fact exists.");
try
{
m_loadedTrainedModel = m_mlObj.Model.Load(fileDir, out m_modelSchema);
}
catch (Exception e)
{
Console.WriteLine("\n\n\nInner exception: " + e.InnerException);
}
}
else
{
Console.WriteLine("File does not exist");
}
I have a breakpoint on the "m_loadedTrainedModel = m_mlObj.Model.Load(fileDir, out m_modelSchema);" line of course and it always triggers an exception.
The exception states:
---> System.TypeLoadException: Could not load type of field 'Microsoft.ML.Transforms.DnnRetrainTransformer:_tfInputShapes' (9) due to: Could not resolve type with token 01000060 from typeref (expected class 'Tensorflow.TensorShape' in assembly 'TensorFlow.NET, Version=0.20.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51') assembly:TensorFlow.NET, Version=0.20.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd5 1 type:Tensorflow.TensorShape member:(null)
What I THINK this means is it's checking for Tensorflow.TensorShape inside of the package TensorFlow.NET and isn't finding it. If that's the case, I believe I don't have the correct package installed so my Xamarin project will be able to load the model correctly, maybe? Or if not, then what may be the real underlying issue? The code seems straight forward so I'm a bit perplexed as to how this is failing.
If the solution is blatantly going over my head, my apologies and thank you to anyone who is willing to help.
When working with ML.NET on ARM, TensorFlow is one of the limitations at the time of this writing.
https://devblogs.microsoft.com/dotnet/ml-net-june-updates-model-builder/#ml-net-on-arm
What you might want to consider in the meantime is deploying your model as a Web API and making requests to that API from your mobile app.
https://learn.microsoft.com/dotnet/machine-learning/how-to-guides/serve-model-web-api-ml-net
I'm trying to get Xamarin.Android to generate bindings for a library supplied as an AAR. JAR2XML is giving me a lot of "can't find type" errors, so I thought I'd try class-parse, but in addition to some library references I'm trying to track down, I'm getting a couple of these:
1> Error while processing '[Method] java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal temporal, long newValue)' in '[Class] java.time.temporal.ChronoField': Type 'java.time.temporal.Temporal' was not found. (TaskId:69)
1> Error while processing '[Method] java.time.temporal.Temporal addTo(java.time.temporal.Temporal temporal, long amount)' in '[Class] java.time.temporal.ChronoUnit': Type 'java.time.temporal.Temporal' was not found. (TaskId:69)
Now, java.time.temporal.Temporal is a new type in JDK 1.8, so I'm wondering if maybe that's part of my problem here (ie. maybe the types that can't load are using other new-in-1.8 types). Running bin\javac -version in the path specified in Options-Xamarin-Android Settings says I'm using "1.8.0_172". My project is targeting "Android 8.1 (Oreo)" - ie. api level 27. Is there some other option I need to set to make sure I'm using 1.8?
I'm having problems with a specific line of code - building.transmitter:[operation](player, unpack({...})) that causes an error in Corona, yet this loads fine when it's run in Lua separately. I suspect it has something to do with the : being placed before the [operation] variable but I'm clueless why.
Specifically the module is written as,
local activate = {}
local function activate.transmitter(player, operation, ...)
building = player:getTile()
building.transmitter:[operation](player, unpack({...}))
end
return activate
The runtime errror that is appearing gives me
"error loading module from file, '<name>' expected near '['"
Edit - WOW! I didn't notice that when troubleshooting this in Corona I changed some of the lines of code to identify the problem. I then mistakenly tested the edited code in Lua and it ran fine. I didn't realize the code wasn't the original until siffiejoe pointed out the interpreter getting an error as well. Sorry for the mistake.
maybe Corona uses older version of Lua which does not support this syntax. You can try workaround instead of
building.transmitter:[operation](player, unpack({...}));
you can call
building.transmitter[operation](building.transmitter, player, unpack({...}));
I've just been spending hours on an issue that some others have reported to experience too.
The Sample.Oauth2.OAuthClient projet sample does not work for me.
Let me explain in details:
I got the latest version of dotnetopenauth from github (december 12th)
I ensured to "unblock" the zip before extracting all files.
I opened the solution with VS2012 (under Win7)
When starting the
Sample.Oauth2.OAuthClient project,
the overall build process succeed.
The website is started.
When calling
Sign in with Facebook (OAuth 2.0)
I get
Attempt by method
'DotNetOpenAuth.OAuth2.WebServerClient+d__3.MoveNext()'
to access method
'System.Collections.Generic.List`1..ctor()' failed.
Line 106: // verifiable for the same user/session.
Line 107: // If the host is implementing the authorization tracker
though, they're handling this protection themselves.
Line 108: var cookies = new List();
Line 109: if (this.AuthorizationTracker
== null) {
Line 110: string xsrfKey =
MessagingUtilities.GetNonCryptoRandomDataAsBase64(16, useWeb64: true);
That the provided code is not able to access "System.Collections.Generic.List" bewilders me...
I tried the following :
adding
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal"/>
</securityPolicy>
to web.config.
Note that checking just before the line the "CurrentTrustLevel" results in "Unrestricted".
I tried to publish to local IIS 7,
tried running the pool under "administrator"
and finally
I tried with VS2013 on another, "clean" installation of Win7,
All attempts lead to the same result ...
It seems that the errors comes from some System.Net Dlls provided with the samples : they cannot be run by asp.net for security reasons (?)
Any idea ?