Closed DavidRLovell closed 1 year ago
I had the same error try to change your package version, then run the program again
pip3 install Werkzeug==2.0.0
pip3 install Flask==2.0.0
Thank you, @HiIAmTzeKean ... Same problem, same solution.
I made a PR #172 to pull the latest 2.x versions of those two libraries, not just 2.0.0.
Dear @HiIAmTzeKean, I'm very grateful to you for helping me. This does the trick, though I do get some warnings:
(base) PS C:\Users\me\OneDrive - Queensland University of Technology\Slack> pip3 install Werkzeug==2.0.0
Collecting Werkzeug==2.0.0
Downloading Werkzeug-2.0.0-py3-none-any.whl (288 kB)
---------------------------------------- 288.1/288.1 kB 9.0 MB/s eta 0:00:00
Installing collected packages: Werkzeug
Attempting uninstall: Werkzeug
Found existing installation: Werkzeug 3.0.0
Uninstalling Werkzeug-3.0.0:
Successfully uninstalled Werkzeug-3.0.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 3.0.0 requires Werkzeug>=3.0.0, but you have werkzeug 2.0.0 which is incompatible.
Successfully installed Werkzeug-2.0.0
Dear @HiIAmTzeKean and @timbaileyjones, Again, thanks for your help. If you have the time and inclincation, could you explain to me (as a python novice) how I could have figured out the solution you provided @HiIAmTzeKean? Would I have had to have known info about the internals of slack-export-viewer, or is the solution obvious to experienced python programmers? With gratitude! David
I can't exactly give you a concrete answer as to why 2.0.0 works as I did a trial an error when I was debugging. But based on the error message it seems like there was a function call that was not recognised/ misbehaving. I do not know the internal workings of the code myself as I am an end user, but searching up the error message will yield some results that regarding flask dependencies.
Hope this helps!
Werkzeug and Flask have been pinned to <3.0.0 in the latest release, so this shouldn't happen anymore
When software has a revision change, as both of these libaries did, from 2.x to 3.0 in this case, it is called a MAJOR release. If it had been a change in the second number, say 2.1 to 2.2, it is called a MINOR release. If it had been a change in the third number, say 2.1.1 to 2.1.2, that is called a PATCH release.
There are general expectations communicated from the authors, by which part of the version number is updated. Read more fully about it here. This idea is called Semantic Versioning.
One of those expectations is that you can EXPECT breaking changes with major releases. The original requirements.txt file didn't specify a particular version at all, and pip grabs the latest version (which in this case was 3.x). So both @HiIAmTzeKean's fix and my PR just pin those two libraries to versions that are in the 2.x range. He specified the very first release in the 2.x series, which is 2.0.0. My PR was the same idea, but mine will pull the latest 2.x, not the oldest. (i.e the latest that is less than 3.0.0).
Also, more experienced pythonistas have experienced similar breakage with those two particular libraries going from 2 to 3, and may have just known instinctively that this was the problem.
So part of this lesson is how Semantic Versioning works. The second part is how important it is to properly pin your project's requirements, to at least the right MAJOR version.
The third lesson is how quickly this open source can work to solve problems.
Problem solved! I wrote about the whole journey here and you guys are part of it!
Thanks again @timbaileyjones, @HiIAmTzeKean and, of course @hfaran.
more experienced pythonistas have experienced similar breakage with those two particular libraries going from 2 to 3, and may have just known instinctively that this was the problem.
...is, I think, the case. since the original error message said nothing about package versions. All the best! David
Apologies in advance: I'm no pythonista: the issue may be obvious, but not to me.
If I install and invoke
slack-export-viewer
from my Anaconda Powershell Prompt window, things fail as follows. Any advice, workarounds etc, would be greatly appreciated!