Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

No handlers could be found for logger "pip.index" #106

Open
jblaine opened this issue Mar 23, 2018 · 8 comments
Open

No handlers could be found for logger "pip.index" #106

jblaine opened this issue Mar 23, 2018 · 8 comments

Comments

@jblaine
Copy link
Contributor

jblaine commented Mar 23, 2018

poise 2.8.1
poise-languages 2.1.1
poise-python 1.6.0

Cannot really make sense out of what is happening here.

* python_package[wheel] action install
  ================================================================================
  Error executing action `install` on resource 'python_package[wheel]'
  ================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
python_package[wheel] (/var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 153) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["/usr/bin/python", "-", "wheel"] ----
STDOUT:
STDERR: No handlers could be found for logger "pip.index"
Traceback (most recent call last):
  File "<stdin>", line 38, in <module>
  File "/usr/lib/python2.7/site-packages/pip/index.py", line 514, in find_requirement
    'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for wheel
---- End output of ["/usr/bin/python", "-", "wheel"] ----
Ran ["/usr/bin/python", "-", "wheel"] returned 1

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
/var/chef/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
/var/chef/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
/var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:282:in `pip_command'
/var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:306:in `pip_outdated'
/var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:180:in `check_package_versions'
/var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:160:in `load_current_resource'
/var/chef/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
/var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/r701-python/recipes/default.rb

  8: python_runtime '2' do
  9:   not_if {node['platform_family'] == 'rhel' && node['platform_version'].to_i == 5}
 10:   provider :system
 11:   setuptools_version false
 12: end

Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/r701-python/recipes/default.rb:8:in `from_file'

python_runtime("2") do
  provider PoisePython::PythonProviders::System
  action [:install]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  subresources [python_runtime_pip[2], python_package[wheel], python_package[virtualenv]]
  declared_type :python_runtime
  cookbook_name "r701-python"
  recipe_name "default"
  get_pip_url "https://bootstrap.pypa.io/get-pip.py"
  pip_version true
  version "2"
  virtualenv_version true
  wheel_version true
  not_if { #code block }
end

Platform:
---------
x86_64-linux
@jblaine
Copy link
Contributor Author

jblaine commented Mar 23, 2018

I'll add that if I mask the problem by setting wheel_version false in my resource, it just falls through to the next problem (virtualenv):

* python_package[virtualenv] action install

  ================================================================================
  Error executing action `install` on resource 'python_package[virtualenv]'
  ================================================================================

  Mixlib::ShellOut::ShellCommandFailed
  ------------------------------------
  Expected process to exit with [0], but received '1'
  ---- Begin output of ["/usr/bin/python", "-", "virtualenv"] ----
  STDOUT:
  STDERR: No handlers could be found for logger "pip.index"
  Traceback (most recent call last):
    File "<stdin>", line 38, in <module>
    File "/usr/lib/python2.7/site-packages/pip/index.py", line 514, in find_requirement
      'No matching distribution found for %s' % req
  pip.exceptions.DistributionNotFound: No matching distribution found for virtualenv
  ---- End output of ["/usr/bin/python", "-", "virtualenv"] ----
  Ran ["/usr/bin/python", "-", "virtualenv"] returned 1
...
...

@coderanger
Copy link
Member

Pip released a new rev yesterday, so that might be related. Does it get better if you lock pip to 9.0.2?

@coderanger
Copy link
Member

(or 9.0.1)

@jazaval
Copy link

jazaval commented Mar 26, 2018

Observing this as well, but intermittently between multiple runs on the same node.

@jblaine
Copy link
Contributor Author

jblaine commented Mar 26, 2018

Ours stopped freaking out sometime over the weekend on all of our nodes. I could be wrong, but it seemed to only be happening on RHEL 7 nodes.

@jazaval
Copy link

jazaval commented Mar 26, 2018

Happening for us on our macOS nodes.

@coderanger
Copy link
Member

This might also be due to the pending removal of TLS 1.0 and 1.1 on PyPI. They have been doing rolling brownouts to test the removal so you might be failing. You will need to upgrade to versions of things which support TLS 1.2 to use PyPI going forward.

@salsa-dev
Copy link

the workaround here #140 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants