Error installing spida and p3d: type == "both" can not be used with 'repos = NULL' - install.packages

I am trying to install the spida and p3d packages, zipped on my computer, but this error message always appears:
Error in install.packages: type == "both" can not be used with 'repos = NULL'
I have already added type = "binary" and type = "source" in the code, and it still gives the error.
What am I doing wrong?

Related

Custom error message is not showed in the app

In the restful app I am implementing error handling, but I cannot see the error message being displayed in the frontend UI. Instead, I only see a different error message from the framework.
Although I can see that my custom error message error message being propagated to the frontend it appears to be subsequently overwritten with a different message from the framework.
So I am not sure if this is something with the versions I work with (ABAP-1909 and UI5-1.96.12) or it is my implementation issue.
Implementation type: Unmanaged scenario.
ABAP version: S/4 Hana On Prem 1909
UI5 Version: '1.107.1'
Code snippet:
APPEND VALUE #( %cid = <fs_lsi_create>-%cid
uuid = ls_lsi_crt-uuid
) TO failed-incidents.
APPEND VALUE #(
%cid = <fs_lsi_create>-%cid
%key-uuid = ls_lsi_crt-uuid
%msg = new_message( id = 'ZLSAPP_MSG'
number = 001
severity = if_abap_behv_message=>severity-error
v1 = <fs_lsi_create>-name )
uuid = ls_lsi_crt-uuid ) TO reported-incidents.
I was expecting to see the error message in a popup on the frontend application, but I see it only in the debugger console, it doesn't appear in the error popup screen.

Error in db2hpu procedure call

Is there a solution to this problem in db2hpu call:
SQL0443N Routine "DB2INST1.DB2HPU" (specific name "SQL160823160100917") has
returned an error SQLSTATE with diagnostic text "Cannot Connect: rc =
0x25a7dd". SQLSTATE=38107
Thanks a lot
The "Cannot Connect: rc = ..." error is coming from HPU stored procedure, not DB2 itself.
It may be raised if the db2hpudm deamon is not able to start.
Verify that the HPU was correctly installed and that you have no warnings or error in the installation trace files under :
[INSTALLDIR]/install/trace_error_install
[INSTALLDIR]/install/trace_warning_install

Windows, Ec2ServerCreate - Cannot set JSON attributes when running knife from Rails application

I am able to launch new instance at AWS from Ruby on Rails application (Chef::Knife::Ec2ServerCreate.new()). Works fine till I try to set JSON attributes. When I set them from command line and invoke knife.bat, it works.
Looking at ec2_server_create shows that command line option --json-attributes is mapped to symbol :json_attributes. I tried to set it using following code:
Chef::Config[:knife][:json_attributes] = "{'NodeName' : 'Node001'}"
and I get error:TypeError (no implicit conversion of Symbol into Integer):
As soon as I comment this single line, instance is created, registered with chef server and recipe is running.
Any suggestion how to set json attributes of first chef-client run?
PS
Sample code shows constant value for attribute, but actual value would be dynamically created.
Error message and code line where error occurs:
/chef/knife/core/bootstrap_context.rb:188:in `[]=': no implicit conversion of Symbol into Integer (TypeError)
Looking into source you can find:
def first_boot
(#config[:first_boot_attributes] || {}).tap do |attributes|
if #config[:policy_name] && #config[:policy_group]
attributes[:policy_name] = #config[:policy_name]
attributes[:policy_group] = #config[:policy_group]
else
attributes[:run_list] = #run_list #THIS LINE CAUSES EXCEPTION
end
attributes.merge!(:tags => #config[:tags]) if #config[:tags] && !#config[:tags].empty?
end
end
I set run list.
The issue is that json_attributes needs to be a hash, not a string. It isn't the #run_list that is failing, it is "{'NodeName' : 'Node001'}"[:run_list] which when you see in on place is probably a bit clearer.

How to print a message when an assert fails, in Dart?

We'd like to print a message when an assert() fails. Currently in Dart, an assert only takes a boolean. We'd like to give the developer explicit reasons and instructions for what to do when the assert fails.
As of Dart 1.22, assert() takes an optional message.
assert(configFile != null, "Tool config missing.");
If the assertion fails, it will produce something like the following:
Unhandled exception:
'file:///.../main.dart': Failed assertion: line 9 pos 10:
'configFile != null': Tool config missing.
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:33)
#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:29)
#2 main (file:///.../main.dart:9:10)
Note that the error message includes the actual assertion (configFile != null).
Just to add, if you're executing a dart file via command line, you need to enable asserts as follows, see reference here:
dart --enable-asserts main.dart
There is an open issue with a workaround https://github.com/dart-lang/sdk/issues/6190#issuecomment-119103626
assert(() => test || throw "message");
I tried this but this way it doesn't work. A slightly modified working version
var test = false;
assert(test ? true : throw "message");
See also
https://groups.google.com/a/dartlang.org/forum/#!topic/core-dev/yNiTFYmtmwY
https://github.com/dart-lang/sdk/issues/24213
https://github.com/sethladd/dep_assert_with_optional_message/blob/master/proposal.md

DomainTypes in XmlProvider FS0039 not defined

I am trying to use the FSharp.Data XmlProvider.
According to the samples you can access nested types and create a function that will receive a parameter of one of those types.
https://github.com/fsharp/FSharp.Data/blob/master/samples/library/XmlProvider.fsx (line 177)
However when I try to do the following:
type businessesT = XmlProvider<"Businesses.xml">
type businessT = businessesT.DomainTypes.Business
let testfunc (b:businessesT.DomainTypes.Business) =
b
It seems to work until I actually compiles and then I get
error FS0039: The type 'Business' is not defined
UPDATE:
The problem can be reproduced with the sample from FSharp.Data (XmlProvider.fsx)
adding a type alias after line 205
type Rss = XmlProvider<"http://tomasp.net/blog/rss.aspx">
type test = Rss.DomainTypes.Channel
What is strange is that the sample with the printDiv function is working...
This is most likely caused by some problem with loading the type provider - if the compiler fails to load the type provider, then it cannot run it and so none of the provided types like Business would be defined.
Are you using #r in a script file, or are you referencing the type provider through "Add References" in a project? If you're using #r, check if there is any error message on that line. In case of project, check other error messages output by the compiler.
I already listed some common reasons why type provider fails to load in another answer.
This was probably the same problem as "type provider" not recognized when building project, which has been fixed in FSharp.Data 1.1.10

Resources