Coder Social home page Coder Social logo

Problem with run_ray_tracing about xrt HOT 24 OPEN

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024
Problem with run_ray_tracing

from xrt.

Comments (24)

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

There are two underscores before and after "file"

from xrt.

kklmn avatar kklmn commented on July 3, 2024

What is printed by python --version?

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

According to the documentation, a list of FrameInfo is returned starting from version 3.5.

Don't know what is the problem here but I'll put an extra check there. Please try (the two middle lines are inserted):

    mod = inspect.getmodule(frm[0])
    if mod is None:
        mod = inspect.getmodule(frm)
    runfile = mod.__file__

Thank you for reporting it!

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

When in Spyder, try to run it in external system terminal.

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

What happens if you unzip the GitHub xrt package to any user location and run xrtQookStart.pyw from there?

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

I suspect you have several versions of xrt. Start python from your working directory and type

>>> import xrt
>>> xrt.__file__

Is the library location where you expect it to be? If not, delete it from there and try again.

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

Do you get a single iteration ready? (when you see values for N_all, N_good and Flux)
Try processes=1 in xrtr.run_ray_tracing(plots, repeats=24, ...)

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

Do you see an increased load in a system monitor?

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

I think that the problem with inspect is indicative of a corrupt python installation. The easiest solution is to install the latest WinPython and forget all the troubles.

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

I think the problem is not with python version but rather with proper package management. With WinPython you get a portable system that doesn't need system paths, you can move it to any location, just run its command line shell and you have all the definitions inside. If you want to go a hard way of fixing broken paths and dependences inside your python installation, nobody can help you.

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

Make sure you start the WinPython's Spyder, not your previous Spyder version. Spyder's IPython console is not compatible with multiprocessing. So if you want multiprocessing, select the run option "Execute in an external system terminal".

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

kklmn avatar kklmn commented on July 3, 2024

How about running the script in an external system terminal (but still from Spyder)?
Alternatively, set processes=1.

from xrt.

zhangyujun08 avatar zhangyujun08 commented on July 3, 2024

from xrt.

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.