question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Different resolution failure messages on different verbosity

See original GitHub issue
  • pip version: 21.0.1
  • Python version: 3.6 (but 3.7 and 3.8 have the same problem)
  • Operating system: Linux (Debian buster docker image)

PIP 21.0.1 sometimes produces wrong error about conflicts , and it produces different (correct!) error when -vvvv options are added.

This problem originated with https://github.com/apache/airflow/issues/15463 (you can see history of it there). We have quite complex dependencies in Airlfow and we are still recommending people to install airflow with PIP 20.2.4, but we are hoping to get rid of that limitation, one problem however was a very strange one and we did not have time to look at it - but when I looked today I realized that the error printed by PIP was misleading (as I could not see the reason for the original error).

I believe PIP instead of pyarrow reports google-cloud-bigquery-storage as having a problem. Looks like instead of printing the actual dependency that has a problem, it prints the “sibling” of that dependency (or smth like that).

It is very easily reproducible:

  1. Run: pip install apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt

You should get an error:

ERROR: Could not find a version that satisfies the requirement google-cloud-bigquery-storage<2.0.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])
  1. Run pip install -vvvv apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt

You should get an error:

ERROR: Could not find a version that satisfies the requirement pyarrow<2.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])
ERROR: No matching distribution found for pyarrow<2.0dev,>=1.0.0; extra == "bqstorage"

I believe in both cases we ONLY have problem with pyarrow, and it is misreported without the -vvvv flag. Looks like instead of actual dependency that is wrong (pyarrow), the sibling of that dependency (google-cloud-bigquery-storage) is printed out by PIP. Note that other than the dependency - those are the very same limits which are problematic (<2.0.0dev,>=1.0.0; extra == “bqstorage”).

I also could not find any other packages from those being installed where google-cloud-bigquery-storage would be limited to <2.0.0dev,>=1.0.0 - that’s why I think this is a bug in PIP.

Gists with the outputs to compare

pip install apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt :

Here: https://gist.github.com/potiuk/04f6127469a709e3e47be7585c9a863c

pip install -vvvv apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt:

https://gist.github.com/potiuk/17a3d591fb091bdd8a0e213f49b6b0af

I might be wrong, of course, but it looks like this.

UPDATE:

I run it with -vv and it fails with the 'google-cloud-bigquery-storage` error: https://gist.github.com/potiuk/2f9af6a8eaac7ea393fd1f9fe64361c7

The -v and -vvv both fail with pyarrow error.

In neither of those I can find where the google-cloud-bigquery-storage<2.0.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas]) comes from 😦.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
uranusjrcommented, Jul 8, 2021

So it turns out the different error message is due to pkg_resources returns dependencies in indeterministic ordering (because internally it uses set to store those). When the ordering is different, the resolver can be sent down to subtrees in different orders, and report different errors if you have multiple conflicts in the dependency graph.

I think we should sort the dependencies somehow (maybe just alphabetically), this would be good for debuggability, if nothing else.

2reactions
uranusjrcommented, Apr 23, 2021

constraints-3.6.txt

Above is a snapshot of the constraints-3.6.txt file that caused the issue, for future reproduction. I’m assuming the file hosted in Airflow’s repo will be overwritten once you sort out the conflicts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Increasing Tomcat logging verbosity for quick problem resolution
Increasing logging verbosity of a Java application can be helpful in quick problem identification and resolution as error messages with default ...
Read more >
Verbose Error Messages - Liferay Help Center
Resolution. Each application is responsible for allowing its information to be displayed but not Liferay. We can definitely restrict the ...
Read more >
Application Logging and the logging.destination and logging ...
Setting the log level for an application to error generates error messages only, but does not generate warn, info, or debug messages.
Read more >
[Feature] Optional verbose output when running on CI #2443
We are currently facing in more than half of our CI builds failing with yarn install being completely stuck (or sometimes finishing in...
Read more >
How to control on database logging (.lg) verbosity and errors ...
A set of error codes or messages to search database logs for to indicate ... like warnings in certain contexts and errors in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found