Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advance python scheduler 'tuple' object has no attribute 'public' while starting the scheduler

Tags:

apscheduler

Starting the scheduler gives this error. As i can see in the commits that this piece of code was added just 3 days back. So am i missing something here or its a bug ?

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'**
like image 826
ashish jain Avatar asked Apr 05 '16 21:04

ashish jain


2 Answers

I just had this problem and solved it.

Just upgrade setuptools:

pip install setuptools --upgrade

And then it should work properly.

like image 59
Kyle Calica-St Avatar answered Sep 19 '22 02:09

Kyle Calica-St


If you are using virtualenv than its not advisable to directly upgrade the setuptools package due to some security reasons that's what i got after searching SO. you should ideally update your virtualenv package itself to latest version which while creating a virtual environment using this command

virtualenv <name of virtual environment>

install 2 packages. 1) pip 2) setuptools This way both pip and setuptools will have the latest versions.

like image 42
ashish jain Avatar answered Sep 20 '22 02:09

ashish jain