P_logodds__ doesn't let me create a model with two beta distributions

I want working in an A/B testing project, but I’m having problems with creating a model with two beta distributions.
This is my code:

class Experimental:
    def __init__(self,prior_alpha,prior_beta,data):


        with pm.Model() as model:
            prior = pm.Beta("p", alpha=self.prior_alpha, beta=self.prior_beta)            
            obs = pm.Binomial("y", n=data["succ"]+data["fail"], p=prior, observed=data["succ"])
            post = pm.Beta("p", alpha=self.post_alpha, beta=self.post_beta)
            self.model = model


And this is the error:

~\anaconda3\envs\retention\lib\site-packages\pymc3\distributions\distribution.py in __new__(cls, name, *args, **kwargs)
    120         else:
    121             dist = cls.dist(*args, **kwargs)
--> 122         return model.Var(name, dist, data, total_size, dims=dims)
    124     def __getnewargs__(self):

~\anaconda3\envs\retention\lib\site-packages\pymc3\model.py in Var(self, name, dist, data, total_size, dims)
   1140             else:
   1141                 with self:
-> 1142                     var = TransformedRV(
   1143                         name=name,
   1144                         distribution=dist,

~\anaconda3\envs\retention\lib\site-packages\pymc3\model.py in __init__(self, type, owner, index, name, distribution, model, transform, total_size)
   2010             transformed_name = get_transformed_name(name, transform)
-> 2012             self.transformed = model.Var(
   2013                 transformed_name, transform.apply(distribution), total_size=total_size
   2014             )

~\anaconda3\envs\retention\lib\site-packages\pymc3\model.py in Var(self, name, dist, data, total_size, dims)
   1188                 self.named_vars[var.missing_values.name] = var.missing_values
-> 1190         self.add_random_variable(var, dims)
   1191         return var

~\anaconda3\envs\retention\lib\site-packages\pymc3\model.py in add_random_variable(self, var, dims)
   1194         """Add a random variable to the named variables of the model."""
   1195         if self.named_vars.tree_contains(var.name):
-> 1196             raise ValueError(f"Variable name {var.name} already exists.")
   1198         if dims is not None:

ValueError: Variable name p_logodds__ already exists.

It seems that for some reason, pm.Beta() creates a variable "p_logodds__ ", and since there are two pm.Beta() these variable names collides.
So, my questions are: what is p_logodds__ for?, is there any reason for me to not just delete it?, do I need two different models?


You have 2 parameters named p. Rename one of them and you should be good.