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

2

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'**
Foret answered 5/4, 2016 at 21:50 Comment(1)
try upgrading setuptools, pip install setuptools --upgradeUnpleasantness
U
8

I just had this problem and solved it.

Just upgrade setuptools:

pip install setuptools --upgrade

And then it should work properly.

Unpleasantness answered 11/4, 2016 at 21:37 Comment(3)
Thanks Kyle I got the answer after creating an issue within github of apscheduler.Foret
It worked for me too, but why does this fix the problem? What's the root cause here?Jakejakes
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.Unpleasantness
F
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.

Foret answered 13/4, 2016 at 16:45 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.