Coder Social home page Coder Social logo

Comments (16)

yxrmz avatar yxrmz commented on September 26, 2024 1

I mean visualization bug in W11.
Now, regarding sphinx, here's what worked for me:
Fresh conda env, xrt installed with setup.py

conda install pyqt
conda install sphinxcontrib-applehelp
conda install sphinxcontrib-htmlhelp
conda install sphinxcontrib-jquery -c conda-forge

then install pyopengl, pyopengl-accelerate from Gohlke's whl's. Qook should work fine. (Glow still has issues with surfaces, I'll try to figure out what's wrong here)

from xrt.

kklmn avatar kklmn commented on September 26, 2024

Hi!

I can't reproduce this. So far, no ideas.
Please paste here what you see under "Your system:" on the welcome page of xrtQook.

js: Uncaught ReferenceError: $ is not defined is due to an old version of Sphinx and absent sphinxcontrib-jquery.

from xrt.

CharlesCardot avatar CharlesCardot commented on September 26, 2024

xrtGlowOEvisualbug_3

I can try insalling pyopencl too, but my laptop doesn't have a GPU and I would be surprised if it was related to that.

Update: tried installing pyopencl, pip install pyopencl resulted in version 2022.3.1, still seeing visual issue in xrtGlow

from xrt.

kklmn avatar kklmn commented on September 26, 2024

I see that you're not running xrtQook from the last GitHub version, whereas I guess you do have it. Please try to locate the new version of xrtQookStart.py and start it from that location.

from xrt.

CharlesCardot avatar CharlesCardot commented on September 26, 2024

Hello,

You were right! Sadly the rabbit hole goes deeper. I suspected that somehow my "xrt" library wasn't pointing at the one that I downloaded from github and was instead pointing at the one I took from PyPi, so I created an entirely new python environment and installed everything from scratch. I recloned the github repo, reran setup.py using the new python envrionment. I navigated to xrt\xrt\gui and ran python xrtQookStart.py.

This was the output

(new_envrionment) C:\Users\ccard\Downloads\xrt\xrt>cd gui

(new_envrionment) C:\Users\ccard\Downloads\xrt\xrt\gui>python xrtQookStart.py
[21396:18996:0424/135547.230:ERROR:cache_util_win.cc(21)] Unable to move the cache: Access is denied. (0x5)
[21396:18996:0424/135547.230:ERROR:cache_util.cc(139)] Unable to move cache folder C:\Users\ccard\AppData\Local\python\QtWebEngine\Default\GPUCache to C:\Users\ccard\AppData\Local\python\QtWebEngine\Default\old_GPUCache_000
[21396:18996:0424/135547.231:ERROR:disk_cache.cc(184)] Unable to create cache
[21396:18996:0424/135547.231:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
Traceback (most recent call last):
  File "C:\Users\ccard\Downloads\new_envrionment\lib\site-packages\sphinx-6.2.0-py3.10.egg\sphinx\registry.py", line 442, in load_extension
    mod = import_module(extname)
  File "C:\Users\ccard\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'sphinxcontrib.applehelp'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\ccard\Downloads\new_envrionment\lib\site-packages\xrt-1.5.0-py3.10.egg\xrt\gui\xrtQook\__init__.py", line 163, in render
    ext.sphinxify(self.doc, cntx, img_path=self.img_path)
  File "C:\Users\ccard\Downloads\new_envrionment\lib\site-packages\xrt-1.5.0-py3.10.egg\xrt\gui\commons\ext.py", line 115, in sphinxify
    sphinx_app = Sphinx(srcdir, DOCDIR, DOCDIR, doctreedir, buildername,
  File "C:\Users\ccard\Downloads\new_envrionment\lib\site-packages\sphinx-6.2.0-py3.10.egg\sphinx\application.py", line 225, in __init__
    self.setup_extension(extension)
  File "C:\Users\ccard\Downloads\new_envrionment\lib\site-packages\sphinx-6.2.0-py3.10.egg\sphinx\application.py", line 404, in setup_extension
    self.registry.load_extension(self, extname)
  File "C:\Users\ccard\Downloads\new_envrionment\lib\site-packages\sphinx-6.2.0-py3.10.egg\sphinx\registry.py", line 445, in load_extension
    raise ExtensionError(__('Could not import extension %s') % extname,
sphinx.errors.ExtensionError: Could not import extension sphinxcontrib.applehelp (exception: No module named 'sphinxcontrib.applehelp')

(new_envrionment) C:\Users\ccard\Downloads\xrt\xrt\gui>

The xrtQook window opens briefly before closing out. The same behavior is observed whether I run python xrtQookStart.py or python xrtQookStart.pyw.

It seems there is some issues with sphinx and now I can't even get the program to open.

from xrt.

kklmn avatar kklmn commented on September 26, 2024

please try

pip install sphinx==5.3.0
pip install sphinxcontrib-jquery

from xrt.

CharlesCardot avatar CharlesCardot commented on September 26, 2024

Still the same issue sadly, it may be connected to sphinx-doc/sphinx#11130

from xrt.

yxrmz avatar yxrmz commented on September 26, 2024

Have you tried installing sphinxcontrib-applehelp explicitly? https://pypi.org/project/sphinxcontrib-applehelp/

from xrt.

CharlesCardot avatar CharlesCardot commented on September 26, 2024

I have, and it gives me a "requirement already satisfied"

from xrt.

yxrmz avatar yxrmz commented on September 26, 2024

ok, I'll try to reproduce it. so, it's anaconda, python 3.10 as a new environment, and no packages besides those suggested by xrt setup.py, right? what IDE do you use?

from xrt.

CharlesCardot avatar CharlesCardot commented on September 26, 2024

I tested it both with python's built in environment manager https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/, python -m venv new_environment and anaconda. Using python 3.10, no packages other than that from setup.py in xrt, PyQt5, pywebengine, and PyOpenGL. I usually use vscode as my IDE but I haven't been trying to get xrtQook to run in it, I've just been doing everything from command line.

I'm also on windows machine if that's relevant.

I'd say try it within just anaconda first, it's possible pip is screwing up the dependencies real bad. I also tried it in a new conda environment and ran into the same issues, but I'm no anaconda expert, so perhaps I missed something.

from xrt.

yxrmz avatar yxrmz commented on September 26, 2024

I assume it's windows 11 then, since I'm having similar issues with OpenGL on 11, but not 10.

from xrt.

CharlesCardot avatar CharlesCardot commented on September 26, 2024

That is correct, windows 11

yxrmz, to confirm, were you running into the visualization bug on Windows 11 and not Window 10? Or were you referring to the sphinx issue? I tried installing from Github on Windows 10 and still ran into sphinx issue.

from xrt.

yxrmz avatar yxrmz commented on September 26, 2024

Visualization issue is most probably related to the legacy opengl code we use to plot surfaces. Shaders-based code works fine in W11 (also much faster) but at the moment only implemented for OEs and screens, no slits and sources. I can upload it into a separate branch if you are interested, but I can't promise any support on it until we complete some higher-priority updates.
image

from xrt.

kklmn avatar kklmn commented on September 26, 2024

I can only advise using WinPython. On my Win10 and Win11 xrtQook runs in all versions of WinPython 3.10+, right from the box after doing pip install sphinxcontrib-jquery, no need for any other installation, also including xrt (just go to its location).

from xrt.

CharlesCardot avatar CharlesCardot commented on September 26, 2024

"Now, regarding sphinx, here's what worked for me:
Fresh conda env, xrt installed with setup.py

conda install pyqt
conda install sphinxcontrib-applehelp
conda install sphinxcontrib-htmlhelp
conda install sphinxcontrib-jquery -c conda-forge

then install pyopengl, pyopengl-accelerate from Gohlke's whl's. Qook should work fine. (Glow still has issues with surfaces, I'll try to figure out what's wrong here)"

These steps worked for me! No more sphinx issues. I have not heard of WinPython before, it sounds like I should give it a try.

As for the visualization bug, it isn't game breaking in terms of actually using xrt. I will stick with the version that has the bug and just try to work around it. I'll be excited to update though once you have everything working with shaders.

Thank you both @yxrmz and @kklmn for your help solving this issue, I really appreciated it.

Update: You were correct, doing this through WinPython was 100x easier than trying to manage all the dependencies myself. Thank you.

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.