Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.6 doesn't run your examples #32

Closed
sjjpo2002 opened this issue Sep 27, 2017 · 8 comments
Closed

Python 3.6 doesn't run your examples #32

sjjpo2002 opened this issue Sep 27, 2017 · 8 comments

Comments

@sjjpo2002
Copy link

Looks like the support for Python 3 is not completely developed yet. With Python 3.6 the examples you have don't run:

from luminol.anomaly_detector import AnomalyDetector

What's the easy fix for this?

@brennv
Copy link
Contributor

brennv commented Sep 28, 2017

Could you try this example:

from luminol.anomaly_detector import AnomalyDetector

ts = {0: 0, 1: 0.5, 2: 1, 3: 1, 4: 1, 5: 0, 6: 0, 7: 0, 8: 0}
my_detector = AnomalyDetector(ts)
score = my_detector.get_all_scores()
for timestamp, value in score.iteritems():
    print(timestamp, value)

We're working on an update to the readme with #30. You can preview it here.

Version 0.4 adds the Python 3 support -- pypi has not been updated yet, so for the time being you'd have to clone the repo and run python setup.py install or install it like this:

pip install git+https://github.com/linkedin/luminol.git

@ollieglass
Copy link

Your example throws an error for me, using version 0.4 from github on Python 3.6

from luminol.anomaly_detector import AnomalyDetector

ts = {0: 0, 1: 0.5, 2: 1, 3: 1, 4: 1, 5: 0, 6: 0, 7: 0, 8: 0}
my_detector = AnomalyDetector(ts)

TypeError: '>' not supported between instances of 'NoneType' and 'int'

@brennv
Copy link
Contributor

brennv commented Oct 24, 2017

@ollieglass If you pip freeze does it show luminol==0.4?

@ollieglass
Copy link

Yes

@brennv
Copy link
Contributor

brennv commented Oct 24, 2017

Hmmm, I'm not able to reproduce this but it seems this would be the line that results in the error:
https://github.com/linkedin/luminol/blob/master/src/luminol/anomaly_detector.py#L120

Could we get the full traceback of the error message? As well as any details if this is on OSX/Linux/Windows?

@ollieglass
Copy link

I just reinstalled it, tried the example again and it's working. I'm really sorry, the error is almost certainly at my end.

@brennv
Copy link
Contributor

brennv commented Oct 24, 2017

No worries :) the install process is a bit jenky at the moment... hopefully we can get a new pypi release going soon. #35

@brennv
Copy link
Contributor

brennv commented Jan 9, 2018

I think this issue can be closed now that pypi has been updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants