toml version mismatch errors and steem-python

Words
255
Reading
2 min
Listen
Play
8y

This is more of a developer only post.

Decided to write this post as the error comes again and again and developers are asking for support. The latest being here: https://github.com/steemit/steem-python/issues/176#issuecomment-373969955

The toml libraries packaging has an issue where the developer had by mistake removed version 0.9.3 and added upgraded version of 0.9.3.1. While steem-python and steempy works with toml version 0.9.31, because of the dependency mentioned in steempy and the the version mis-match the installation fails.

toml version mismatch causes the following errors:

On Windows (This was reported by another user):

WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=None, read=None, redirect=0, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x02523990>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /

  • On Linux (Ubuntu and Debian) the scripts using steem-python will give an error like below:

WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=None, read=None, redirect=0, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f465be17f28>: Failed to establish a new connection: [Errno -5] No address associated with hostname',)': /

  • And, steempy will the following error

steempy error

riginal exception was: Traceback (most recent call last): File "/usr/local/bin/steempy", line 7, in <module> steem.cli.legacy() File "/usr/local/lib/python3.6/dist-packages/steem/cli.py", line 83, in legacy version=pkg_resources.require("steem")[0].version File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 984, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 875, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (toml 0.9.3 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('toml==0.9.3.1'), {'steem'})

How to fix the toml error ?

  • how to fix the toml error on Ubuntu Linux
  • how to fix the toml error on macOS
  • how to fix the toml error on windows



PS: the above three lines are added for ease of discovery while searching

edit

/usr/local/lib/python3.6/dist-packages/steem-0.18.103.dist-info/METADATA



and change

toml (==0.9.3.1)

to

toml (==0.9.3)



to test, do the following

steempy set nodes https://steemd.privex.io

and run

steempy

If you have script using steem-python, re-run with the changes and it should work.

For details on installing Python 3.6 on Linux, check this post : Installing Python 3.6 on Ubuntu 16.04

Hope this helps others and this is easily discoverable ....

If you like what I do and write, please consider voting me as a witness :-)


Vote for me as STEEM witness

  1. You can do so by clicking the link above & enter your private key when asked for.
  2. Alternatively, visit https://steemit.com/~witnesses
toml version mismatch errors and steem-python | Ecency