The python scheduler pre-tuple object does not have a public attribute when the scheduler starts

Running the scheduler gives this error. As I can see in the commits, this piece of code was added just 3 days ago. So am I missing something here or is his mistake?

In /local/lib/python2.7/site-packages/apscheduler/__init__.py in <module>() 1) # These will be removed in APScheduler 4.0. 2) **parsed_version =__import__('pkg_resources').get_distribution('APScheduler').parsed_version 3) version_info = tuple(int(x) if x.isdigit() else x for x in parsed_version.public.split('.'))** 4) version = parsed_version.base_version 5) release = __version__ = parsed_version.public **AttributeError: 'tuple' object has no attribute 'public'** 
+7
apscheduler
source share
2 answers

I had this problem and it was resolved.

Just update setuptools:

 pip install setuptools --upgrade 

And then it should work correctly.

+8
source share

If you are using virtualenv, it is not recommended that you update the setuptools package right away due to some security considerations that I got after searching for SO. you should ideally upgrade your virtualenv package to the latest version, which when creating a virtual environment with this command

 virtualenv <name of virtual environment> 

install 2 packages. 1) pip 2) setuptools Thus, both pip and setuptools will have the latest versions.

+1
source share

All Articles