Deepwalk encounters runtimeerror on Windows trying Python multiprocessing problem resolution __python

Source: Internet
Author: User

This experiment is based on deepwalk1.0.2,windows7,64bits

When debugging code TRIDNR, an error occurred while compiling the following module:

Code URL: Https://github.com/shiruipan/TriDNR

Reference paper "Tri-party Deep Network Representation"

The execution of the program is confusing and the reading is unsuccessful. Trace code discovery is under the Networkutils module:


And then query to the Deepwalk module graph.py


To facilitate error correction, we set up a lot of "print ..." "As flag, forgive sincerity small white ...."

We write a read code directly to see the error condition:



The program that should have been all the way to the end of the cycle has been carried out, the execution of a few times after the stop not move ... The reason is unknown.

It can be seen that direct cmd debugging or there are many inconvenient places, so after consulting the teacher, the teacher in Eclipse on the rapid setting up the environment, debugging code, the problem of success in a few minutes get.

RuntimeError on Windows trying pythonmultiprocessing

Runtimeerror:attempt to start a new Processbefore the current process has finished its bootstrapping phase.

Solution Reference URL:

http://stackoverflow.com/questions/28830697/runtimeerror-on-windows-trying-python-multiprocessing?nsukey= 5vkoe8gsbste%2f%2fqyizt51u8wn7qty2k4srz0cau0owqnlesimj4uiwbqljshn7wobud3bdtmdzmmlbnrcpwgdsa% 2b25vmka7tghuhfk3udovjtcfiiaqquujkznfolm8ghsmtynxqtuxef99lzzl3qz8x%2b3ps4ny47eosby8sy8ukbqht2o9udmdg4qkggh8a

Well, we add code to the head of the code:

if __name__ = = ' __main__ ':

Freeze_support ()

#

Your code ...

#


Successfully read data into.

We go back to the beginning of the question:

Add a head to demo.py: Re-test:


Success. Debugging the biggest harvest is the CMD code for small white is still too accustomed to bad people. Often run some mature code simple run a bit OK, but the debugging process is lack of transparency, some bugs are not shown. Or should use the Platform debugging code more, is I am too lazy ....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.