Giter Site home page Giter Site logo

Comments (28)

benmaier avatar benmaier commented on June 12, 2024 1

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

possibly fixed (forgot thread.join()). Can you try?

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

hey @ulfaslak did you have time to test it?

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

Sorry, baby fog, will try later!

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

Alright, it was fast enough to try. So I upgraded with pip to v0.0.6 (right one?), but the bug is still there.

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

ah on sec

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

ok i'm not being very thorough checking if I installed it right here, but downloading the repo and running python setup.py install it installs v 0.0.7, which also imports successfully, but throws the error DistutilsFileError: cannot copy tree '/anaconda3/lib/python3.7/site-packages/netwulf-0.0.7-py3.7.egg/netwulf/js': not a directory at visualize(G)

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

Different behavior now. I interrupt and it doesn't stop, I interrupt it again and it throws error.
nov-19-2018 13-57-46

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

is this fixed by now? 🤔

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

can't reproduce

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

This still happens to me. It's driving me crazy. Also, connected to this, the POST back to Python feature doesn't work. I'll look into this further and we can probably close this for now but jeeeeeesus....

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

It seems to everything right down to line 274 if interactive.py where it hangs on thread.join().

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

I reopen this ... you won't be the only one having this problem

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

This is the output when hitting "Post to Python" and then upon returning to the notebook (where the kernel is still busy), interrupting the kernel:

changing directory to /Users/ulfaslak/.netwulf
starting server here ... /Users/ulfaslak/.netwulf
127.0.0.1 09/Apr/2019 14:17:27 GET /?data=tmp_16a02081db3.json&config=config_tmp_16a02081db3.json HTTP/1.1 200 -
127.0.0.1 09/Apr/2019 14:17:28 GET /config_tmp_16a02081db3.json HTTP/1.1 200 -
127.0.0.1 09/Apr/2019 14:17:28 GET /tmp_16a02081db3.json HTTP/1.1 200 -
127.0.0.1 09/Apr/2019 14:17:29 POST /?data=tmp_16a02081db3.json&config=config_tmp_16a02081db3.json HTTP/1.1 200 -
Successfully posted network data to Python!
127.0.0.1 09/Apr/2019 14:17:31 POST /?data=tmp_16a02081db3.json&config=config_tmp_16a02081db3.json HTTP/1.1 200 -
stopping server ...
was asked to stop the server
deleted all files
---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-6-a227c1684ca5> in <module>
      6     v['group'] = v['block']; del v['block']
      7 
----> 8 visualize(G, verbose=True)

/anaconda3/lib/python3.7/site-packages/netwulf/interactive.py in visualize(network, port, verbose, config)
    272         print('stopping server ...')
    273     server.stop_this()
--> 274     thread.join()
    275 
    276     posted_network_properties = server.posted_network_properties

/anaconda3/lib/python3.7/threading.py in join(self, timeout)
   1030 
   1031         if timeout is None:
-> 1032             self._wait_for_tstate_lock()
   1033         else:
   1034             # the behavior of a negative timeout isn't documented, but

/anaconda3/lib/python3.7/threading.py in _wait_for_tstate_lock(self, block, timeout)
   1046         if lock is None:  # already determined that the C code is done
   1047             assert self._is_stopped
-> 1048         elif lock.acquire(block, timeout):
   1049             lock.release()
   1050             self._stop()

KeyboardInterrupt: 

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

I'm on Python 3.7.3, and netwulf version 0.0.14

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

can you try with the latest commit? I'm pretty sure it won't work but a guy can dream

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

I like your spirit but no cigar. Also, this never runs if you don't interrupt (click Post to Python in webapp)

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

Can it have something to do with the http.serve_forever() line? And that it excepts OSErrors? I tried removing the try-except clause, and nothing happened, but still as I understand it, thread.join() is ineffective because thread is still busy.

Recall that everything runs smoothly down to and including line 273: server.stop_this()

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

Cool thanks. No stress, just got hung up on this now...

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

I've added a timeout to thread.join() -- can you try again with the new commit?

from netwulf.

benmaier avatar benmaier commented on June 12, 2024

I now added a functionality which stops serve_forever

from netwulf.

ulfaslak avatar ulfaslak commented on June 12, 2024

Sweet this works! Causes an error when doing a keyboardinterrupt in Jupyter, made a pull request that fixes this #13 .

from netwulf.

Related Issues (20)

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.