Bad constraint 1.2 grokcore.security>=1.6.1 - plone

I'm running buildout, and getting this error:
Bad constraint 1.2 grokcore.security>=1.6.1
I am stumped trying to find where the >=1.6.1 requirement comes from. I looked in all the setup.py files of all the eggs that come before this error in the buildout -vvvv output, to no avail.
For background: I'm trying to create a new buildout to replicate an existing site. I can't use the original buildout, because I need to integrate it into an existing production install. But the original buildout uses grokcore.security 1.2, and so far in the process I'm using the same version pins of all other distributions, so I don't know why this 1.6.1 is popping up, and worse, I can't find out where it's set.
Any ideas?
Here is the tail of the buildout -vvvv output:
Getting required 'five.grok'
required by plone.directives.dexterity 1.0.2.
Picked: five.grok = 1.3.1
Getting required 'zope.app.content==3.4.0'
We have the distribution that satisfies 'zope.app.content==3.4.0'.
Getting required 'plone.alterego'
required by plone.dexterity 1.1.2.
Picked: plone.alterego = 1.0
Getting required 'plone.synchronize'
required by plone.dexterity 1.1.2.
Picked: plone.synchronize = 1.0.1
Getting required 'rwproperty'
required by plone.dexterity 1.1.2.
Picked: rwproperty = 1.0
Getting required 'z3c.relationfield>=0.4.2'
required by plone.app.relationfield 1.2.0.
Picked: z3c.relationfield = 0.6.1
Getting required 'plone.app.intid'
required by plone.app.relationfield 1.2.0.
Picked: plone.app.intid = 1.0.1
Getting required 'zope.password==3.5.1'
We have the distribution that satisfies 'zope.password==3.5.1'.
Getting required 'zope.app.dependable==3.4.0'
We have the distribution that satisfies 'zope.app.dependable==3.4.0'.
Getting required 'zope.app.debug==3.4.1'
We have the distribution that satisfies 'zope.app.debug==3.4.1'.
Getting required 'zope.app.appsetup==3.11'
We have the distribution that satisfies 'zope.app.appsetup==3.11'.
Getting required 'zope.app.basicskin==3.4.1'
We have the distribution that satisfies 'zope.app.basicskin==3.4.1'.
Getting required 'zope.browserresource==3.9.0'
We have the distribution that satisfies 'zope.browserresource==3.9.0'.
Getting required 'zope.app.interface==3.5.2'
We have the distribution that satisfies 'zope.app.interface==3.5.2'.
Getting required 'zope.browserpage==3.12.2'
We have the distribution that satisfies 'zope.browserpage==3.12.2'.
Getting required 'zope.hookable==3.4.1'
We have the distribution that satisfies 'zope.hookable==3.4.1'.
Getting required 'zope.app.security==3.7.3'
We have the distribution that satisfies 'zope.app.security==3.7.3'.
Getting required 'zope.app.authentication==3.6.1'
We have the distribution that satisfies 'zope.app.authentication==3.6.1'.
Getting required 'grokcore.viewlet==1.3'
We have the distribution that satisfies 'grokcore.viewlet==1.3'.
Getting required 'grokcore.view==1.12.2'
We have the distribution that satisfies 'grokcore.view==1.12.2'.
Getting required 'grokcore.site==1.1'
We have the distribution that satisfies 'grokcore.site==1.1'.
The constraint, 1.2, is not consistent with the requirement, 'grokcore.security>=1.6.1'.
While:
Installing instance1.
Error: Bad constraint 1.2 grokcore.security>=1.6.1

Turns out I was missing a crucial version pin:
five.grok = 1.1.1
So instead it got five.grok 1.3.1, which specifies the requirement for grokcore.security>=1.6.1 in EGG-INFO/requires.txt, which is not where I was looking for it.
This is one example where a better error message would make things a lot easier.

Related

How to accurately use the epi.kappa() function in R?

I am attempting to perform a kappa statistic test on 2 indices I created. I've found that there are multiple packages in R that have functions for this and am trying to compare two functions: the epi.kappa() function in the epiR package and the cohen.kappa() function from the psych package.
I was able to successfully use the cohen.kappa() function with my data however, I continue to get errors when using the epi.kappa() function. My code is as follows
library(epiR)
kap.dat = matrix(c(275,78,305,154),nrow=2,byrow=TRUE)
colnames(kap.dat) = c("I1-0","I1-1")
rownames(kap.dat) = c("I2-0","I2-1")
epi.kappa(kap.dat,method="cohen",alternative= "two.sided",conf.level=0.95)
The error I get is:
Error in epi.kappa(kap.dat,method="cohen",alternative="two.sided", :
object `pO.p` not found
Check that you've got the latest version of epiR installed and update if necessary. Latest version on CRAN is 2.0.50. Type help(epi.about) once package loaded --- version of package will be shown at the bottom of the page.

Why am getting the following error when adjusting a glmm with the "glmmTMB" function and I try to obtain the confidence intervals?

I am trying to run the following model:
Mm3znb<-glmmTMB(total~ Geopolitical-1 + offset(logha) + YearCollected + tmn + (tmn|Site/Plot), ziformula = ~1, data = mc3m, family="nbinom2")
but when I try to obtain the confidence intervals am getting this error:
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
Does anyone know what this issue might be?
This is a problem that has been fixed very recently (June 2022) in the development version (confint wasn't working in models with more than one random effect; (tmn|Site/Plot) is implicitly two random effects, as it gets expanded to (tmn|Site) + (tmn|Site:Plot) internally).
If you can (you will need to install development tools - e.g. Xcode if you're on MacOS, Rtools if you're on Windows), install the development version via
remotes::install_github("glmmTMB/glmmTMB/glmmTMB")
The pkgdown page has a little more information about installing (if all else fails, contact the developers to see if they can make a recent binary package available).

Index error when running maxnet function (maxnet package)

I use the maxnet function (maxnet package) as one of the model algorithms in an ensemble model. Sometimes, the code executes without an error. Other times, it gives me the error message you see below. I am working on a windows 10 Pro (R version 3.6.1, Rstudio version 1.2.5042).
Code:
dm.Maxent <- maxnet(p = train$species, data = train[-train$species],
maxnet.formula(p = train$species,
data = train[-train$species],
classes = "default"))
Error:
Error in intI(j, n = x#Dim[2], dn[[2]], give.dn = FALSE) :
index larger than maximal 185
train is a dataframe with 621 rows (one row for every occurrence/absence point), and 29 columns (28 columns containing variables and 1 column "species" that indicates presence or absence of the species (0/1)).
I am having the same issue. It is unpredictable, since for several species it ran fine, then out of a sudden it stopped.
I found a response on this link: https://github.com/jamiemkass/ENMeval/issues/62
In the new version of maxnet (check the Github repo, as it looks like the CRAN version gas not been updated yet), there is a new argument "addsamplestobackground". When set to TRUE, it solves some of these errors. Currently, you will have to use install_github to reinstall maxnet to use this argument. Once you do, install_github to get the dev branch version of ENMeval (v2), which will implement this by default. Hopefully that fixes these problems.
I reinstalled maxnet from github :
install.packages("remotes")
remotes::install_github("mrmaxent/maxnet")
and set addsamplestobackground = T Maybe this would help you.

Travis builds fail on dplyr vector calls within vignette

When I push my package to travis the vignette checks fail. I'm aware I can skip it but it's bugging me.
I have identified at least one of the issues belongs to a specific call in my code.
The RMD chunk in question:
get_storm_data("fstadv", link = al.1998.charley %>% .$Link)
al.1998.charley:
al.1998.charley <- structure(list(Year = 1998,
Name = "TROPICAL STORM CHARLEY",
Basin = "AL",
Link = "http://www.nhc.noaa.gov/archive/1998/1998CHARLEYadv.html"),
class = "data.frame",
row.names = c(NA, -1L),
.Names = c("Year", "Name", "Basin", "Link"))
The link parameter is a character string sent to the function get_storm_data which does some web scraping.
The following three values are identical:
a <- al.1998.charley %>% .$Link
b <- al.1998.charley %>% `[[`('Link')
c <- "http://www.nhc.noaa.gov/archive/1998/1998CHARLEYadv.html"
identical(a, b)
[1] TRUE
identical(b, c)
[1] TRUE
However, only the value c passed to the link parameter will pass travis.
The travis error:
Building with: R CMD build
6.09s$ R CMD build .
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘Hurricanes’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
Quitting from lines 86-87 (getting-started.Rmd)
Error: processing vignette 'getting-started.Rmd' failed with diagnostics:
is.character(url) is not TRUE
Execution halted
All of my previous attempts to resolve this can be found here, if necessary.
Edit
This vignette never caused issues before. Build 16 passed. Nothing was different in the vignette. I did git diff between that commit and HEAD to bring the branch to it's exact match (since original branch had since been deleted). Other than cosmetic differences in other files (spaces, newlines, etc.), it still failed.
This led me to believe it was an upgrade or change on travis' end. I read over the blog but saw no related changes between the last successful pass (Build 16) and current.
Final Edit
When I mentioned in the last edit the vignette had not changed since the last succesful build, I should have been more clear. That entire commit that passed in March would not pass today. I'm still not clear why.
I would like to point out for any newcomers: check the travis packages to make sure they match your system. R CMD build on my system passed with no issues. But some of my packages were outdated compared to travis'. Thanks to #jimhester (GitHub) for pointing that out.
Session Info
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
_LC_CTYPE=en_US.UTF-8_, _LC_NUMERIC=C_, _LC_TIME=en_US.UTF-8_, _LC_COLLATE=en_US.UTF-8_, _LC_MONETARY=en_US.UTF-8_, _LC_MESSAGES=en_US.UTF-8_, _LC_PAPER=en_US.UTF-8_, _LC_NAME=C_, _LC_ADDRESS=C_, _LC_TELEPHONE=C_, _LC_MEASUREMENT=en_US.UTF-8_ and _LC_IDENTIFICATION=C_
attached base packages:
stats, graphics, grDevices, utils, datasets, methods and base
other attached packages:
Hurricanes(v.0.1.0), dplyr(v.0.5.0), purrr(v.0.2.2), readr(v.1.0.0), tidyr(v.0.6.1), tibble(v.1.2), ggplot2(v.2.2.1), tidyverse(v.1.0.0) and magrittr(v.1.5)
loaded via a namespace (and not attached):
Rcpp(v.0.12.7), digest(v.0.6.10), assertthat(v.0.1), R6(v.2.2.0), grid(v.3.4.0), plyr(v.1.8.4), DBI(v.0.5-1), gtable(v.0.2.0), scales(v.0.4.1), lazyeval(v.0.2.0), data.table(v.1.10.4), tools(v.3.4.0), pander(v.0.6.0), munsell(v.0.4.3), compiler(v.3.4.0) and colorspace(v.1.3-0)
Link in al.1998.charley is stored as a factor on Travis (perhaps you have set the stringsAsFactors option to FALSE somewhere locally?). httr won't coerce a factor vector to character, hence you get an error. Try wrapping as.character() around al.1998.charley %>% .$Link.

Error in clusplot function

I am playing with cluster analysis in R and I would like to plot the cluster:
teste<-data.frame(v1=rnorm(100),v2=rexp(100),v3=runif(100) )
fit.c<- kmeans(teste,2)
aggregate(teste,by=list(fit.c$cluster),FUN=mean)
clusplot(teste, fit.c$cluster, color=TRUE, shade=TRUE,labels=2, lines=0)
But it gives me this error:
Error in clusplot.default(teste, fit.c$cluster, color = TRUE, shade = TRUE, :
4 arguments passed to .Internal(nchar) which requires 3
Does anyone know what is happening?
Thank you
I ran your code and got no problems. I am guessing that there is a version mismatch between your R and the packages you are using. Can you make sure that your cluster package is up to date (and any other packages you are using for that matter), and/or update to the latest version of R?
If that doesn't work, can you add the sessionInfo() information? That is often helpful for diagnosing these sorts of problems.

Resources