Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not look up qualified variable python::install::valid_versions #126

Closed
regeda opened this issue Oct 1, 2014 · 5 comments
Closed

Comments

@regeda
Copy link

regeda commented Oct 1, 2014

Scope(Class[Python]): Could not look up qualified variable '::python::install::valid_versions'; class ::python::install has not been evaluated

Definition:
https://github.com/stankevich/puppet-python/blob/master/manifests/install.pp#L18

Including:
https://github.com/stankevich/puppet-python/blob/master/manifests/init.pp#L73

@jhoblitt
Copy link
Member

jhoblitt commented Oct 2, 2014

I just hit this as well. The python class would have to inherit from python::install in order for this to work. What a PR be accepted to impliment the base class inherients from foo::params pattern?

@regeda
Copy link
Author

regeda commented Oct 12, 2014

You define a variable as "::python::install::valid_version" https://github.com/stankevich/puppet-python/blob/master/manifests/install.pp#L18
But use as "::python::install::valid_versions" https://github.com/stankevich/puppet-python/blob/master/manifests/init.pp#L73

The puppet compiler warns about it: Could not look up qualified variable '::python::install::valid_versions'

@gregsio
Copy link
Contributor

gregsio commented Oct 16, 2014

This module definitely need a python::params class to mitigate this problem (fixing the typo in :python::install::valid_version is not fixing the problem)

@regeda
Copy link
Author

regeda commented Oct 17, 2014

names are different:
variable name "::python::install::valid_version" without "s" in the end
but you include it with "s" in the end as "::python::install::valid_versions"

@gregsio
Copy link
Contributor

gregsio commented Oct 17, 2014

Even when correcting the typo for variable ::python::install::valid_versions you still can't access the variable ::python::install::valid_versions because the class ::python::install has not been evaluated yet.

Class ::python needs to inherits from python::install, but then you run into the same type of problem with the python::install class which needs class ::python to be evaluated first as well...

In order to mitigate these circular issues the proper way is to to create a ::python::params class and have class python inherits python::params

Warning: Scope(Class[Python]): Could not look up qualified variable '::python::install::valid_versions'; class ::python::install has not been evaluated

@smortex smortex changed the title Could not look up qualified variable '::python::install::valid_versions' Could not look up qualified variable python::install::valid_versions Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants