nielstron / quantulum3

Library for unit extraction - fork of quantulum for python3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

os.sched_getaffinity unavailable on Windows

Helveg opened this issue · comments

Describe the bug
Using Windows 10, parser.parse throws:

Traceback (most recent call last):
  File "scaffold.py", line 3, in <module>
    from scaffold.config import ScaffoldIniConfig
  File "C:\Users\robin\Documents\GIT\scaffold-model\scaffold\config.py", line 4, in <module>
    from .quantities import parseMicrometer
  File "C:\Users\robin\Documents\GIT\scaffold-model\scaffold\quantities.py", line 1, in <module>
    from quantulum3 import parser as UnitParser
  File "C:\Users\robin\Anaconda3\lib\site-packages\quantulum3\parser.py", line 17, in <module>
    from . import disambiguate as dis
  File "C:\Users\robin\Anaconda3\lib\site-packages\quantulum3\disambiguate.py", line 7, in <module>
    from . import classifier as clf
  File "C:\Users\robin\Anaconda3\lib\site-packages\quantulum3\classifier.py", line 120, in <module>
    n_jobs=len(os.sched_getaffinity(0))):
AttributeError: module 'os' has no attribute 'sched_getaffinity'

See this SO answer, kinda: https://stackoverflow.com/questions/42538153/python-3-6-0-os-module-does-not-have-sched-getaffinity-method

EDIT: Found this pull request... You state the error should be caught, it's not for me :p

Thanks! Switched to master branch, can you tag/close this issue when it's released?