Skip to content

AttributeError with -w and MatplotlibDeprecationWarning #16

@NekoAlosama

Description

@NekoAlosama

Using py -3 easylist_pac.py -w on Windows 10 produces an error (Python version 3.7.8, Windows version 10.0.18362.1016):

Traceback (most recent call last):
  File "easylist_pac.py", line 2270, in <module>
    res = EasyListPAC()
  File "easylist_pac.py", line 63, in __init__
    self.prioritize_rules()
  File "easylist_pac.py", line 252, in prioritize_rules
    self.logreg_priorities()
  File "easylist_pac.py", line 312, in logreg_priorities
    if self.sliding_window: self.logreg_sliding_window()
  File "easylist_pac.py", line 432, in logreg_sliding_window
    p.start()
  File "C:\Program Files\Python37\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 223, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\Program Files\Python37\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Program Files\Python37\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'EasyListPAC.logreg_sliding_window.<locals>.training_op'

Then there is the MatplotlibDeprecationWarning (Matplotlib version 1.15.0):

easylist_pac.py:50: MatplotlibDeprecationWarning: Support for setting the 'text.latex.preamble' or 'pgf.preamble' rcParam to a list of strings is deprecated since 3.3 and will be removed two minor releases later; set it to a single string instead.
  mpl.rcParams['text.latex.preamble'] = [r'\\usepackage{amsmath,sfmath} \\boldmath']

I'm not familiar with using Matplotlib. @essandess

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions