7

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'**
ashish jain
  • 101
  • 6

2 Answers2

8

I just had this problem and solved it.

Just upgrade setuptools:

pip install setuptools --upgrade

And then it should work properly.

Kyle Calica-St
  • 2,629
  • 4
  • 26
  • 56
  • 1
    Thanks Kyle I got the answer after creating an issue within github of apscheduler. – ashish jain Apr 13 '16 at 16:39
  • It worked for me too, but why does this fix the problem? What's the root cause here? – Cody A. Ray Oct 31 '16 at 14:03
  • I'm thinking because setup tools is not properly upgraded it isn't downloading a dependency properly or upgrading the rest of apschelduler properly. or apschelduler is using something within setuptools that is outdated and that's why you need to upgrade. but that is just a guess. – Kyle Calica-St Oct 31 '16 at 16:53
1

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.

ashish jain
  • 101
  • 6