Package: sagemath
Version: 9.5-6
Severity: normal

Dear Maintainer,

In trying to plot any 3D surface using sagemath and the default 3D
viewer (three.js) the HTML plot page is generated and a new browser
tab is opened however no plot is shown. The three.js tab does have
a menu icon that works, also the source code of the generated HTML 
page and page source looks reasonable including the plotting code.
In the browser debug console only one error is shown. This error is


Uncaught ReferenceError: THREE is not defined
    <anonymous> file:///.../.sage/.../tmp_t5mlfrwr.html:49

The line referenced by the error is

    var scene = new THREE.Scene();

I do see such a variable THREE defined globally in the

However the script included in the sagemath plot is
<script src="/usr/share/javascript/three/r122/three.min.js"></script>

It seems the path to three.min.js should not include "r122". I am not
sure why this is happening.

If a manually edit the tmp_t5mlfrwr.html file and remove the "r122"
then the plot screen becomes black (previously it was white) and
the error message is now different (shown below)

Uncaught TypeError: THREE.MathUtils is undefined
    addLabel file:///.../.sage/.../tmp_oznfc_be.html:208
    <anonymous> file:///.../.sage/.../tmp_oznfc_be.html:155

This is how far I can dig.

-- System Information:
Debian Release: 12.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/6 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sagemath depends on:
ii  python3       3.11.2-1+b1
ii  python3-sage  9.5-6

Versions of packages sagemath recommends:
ii  sagemath-doc        9.5-6
ii  sagemath-jupyter    9.5-6
ii  sagetex             3.6.1+ds-1
ii  texlive-latex-base  2022.20230122-3

Versions of packages sagemath suggests:
pn  dot2tex      <none>
pn  gap-design   <none>
ii  gap-factint  1.6.3+ds-2
pn  gap-grape    <none>
pn  gap-guava    <none>
ii  gap-laguna   3.9.5+ds-2
pn  gap-sonata   <none>
pn  gap-toric    <none>

-- no debconf information

Reply via email to