Coder Social home page Coder Social logo

mantichora's Issues

Debug logging printing to stdout tasks using requests package

Thanks for making this available, it wraps up multiprocessing and threading nicely for my use case!

I'm using this to pull data from a server making requests using the requests package. It works, but the I think the requests.get calls I'm making are printing debug statements for each loop. I'm using atpbar as well and this debug statements are causing the progress bars to be re-printed alternating with the requests debug statements rather than updating.

I tried following the example showing how to use logging and tried that with level=logging.DEBUG, but so far that hasn't prevented the debug statements from being printed. Quite possibly because I've implemented it wrong.

I just tried turning off the logging by doing the following, which worked.

def _configure_logger(self):
    # handler = QueueHandler(self.logging_queue)
    # logger = logging.getLogger()
    # logger.setLevel(logging.DEBUG)
    # logger.addHandler(handler)
    pass

Any suggestions on a better option? I would think the logging example would work if it was re-directing the requests debug statements to a file, so maybe I just have an issue there. Thanks!

multiprocessing.joinablequeue error when running demo code in jupyter lab

Jupyter Lab: 1.2.6
Python: 3.8.0

Running the following demo code:
截屏2020-03-1118 17 22

Background Jupyter service error logging (and the above cell sinked in running status, cannot be stopped):

Process Worker-2:
Process Worker-1:
Process Worker-3:
Traceback (most recent call last):
Traceback (most recent call last):
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/process.py", line 313, in _bootstrap
self.run()
File "
/.pyenv/versions/3.8.0/lib/python3.8/site-packages/mantichora/hubmp.py", line 235, in run
self._run_tasks()
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/process.py", line 313, in _bootstrap
self.run()
File "
/.pyenv/versions/3.8.0/lib/python3.8/site-packages/mantichora/hubmp.py", line 250, in _run_tasks
message = self.task_queue.get()
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/queues.py", line 116, in get
return _ForkingPickler.loads(res)
File "
/.pyenv/versions/3.8.0/lib/python3.8/site-packages/mantichora/hubmp.py", line 235, in run
self._run_tasks()
File "/.pyenv/versions/3.8.0/lib/python3.8/site-packages/mantichora/hubmp.py", line 250, in _run_tasks
message = self.task_queue.get()
File "
/.pyenv/versions/3.8.0AttributeError: Can't get attribute 'task_loop' on <module 'main' (built-in)>
Traceback (most recent call last):
/lib/python3.8/multiprocessing/queues.py", line 116, in get
return _ForkingPickler.loads(res)
File "/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/process.py", line 313, in _bootstrap
self.run()
File "
/.pyenv/versions/3.8.0/lib/python3.8/site-packages/mantichora/hubmp.py", line 235, in run
self._run_tasks()
File "/.pyenv/versions/3.8.0/lib/python3.8/site-packages/mantichora/hubmp.py", line 250, in _run_tasks
message = self.task_queue.get()
AttributeError: Can't get attribute 'task_loop' on <module 'main' (built-in)>
File "
/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/queues.py", line 116, in get
return _ForkingPickler.loads(res)
AttributeError: Can't get attribute 'task_loop' on <module 'main' (built-in)>

mantichora broken on Windows with release 0.9.8?

First of all I would like to thank you for your work on this awesome package.

With the 0.9.8 release (and more specifically, commit 0216c89), manthicora has stopped working for me on Windows. As far as I understand, fork is not available with multiprocessing on Windows.

Is there a way to possibly revert to previous behaviour on Windows in a future release?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.