Sagemanifolds error in example notebook

135 views
Skip to first unread message

Dominic Steinitz

unread,
Feb 7, 2024, 7:16:41 AMFeb 7
to sage-support
I am in the examples folder trying to run 

but I get the error

AttributeError: 'DiffFormFreeModule_with_category.element_class' object has no attribute 'exterior_der'
Here's a MWE
M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian') BL.<t,x,y,z> = M.chart(r"t x y z")
var('E_x E_y E_z')
dt, dx, dy, dz = BL.coframe()[:]
E = E_x * dx + E_y * dy + E_z * dzE.set_name('E')
(E.wedge(BL.coframe()[0])).exterior_der()

Vincent Delecroix

unread,
Feb 7, 2024, 7:43:47 AMFeb 7
to sage-s...@googlegroups.com
The error you get indicates that "exterior_der" is not a valid
operation. Maybe you want "exterior_derivative()"?
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/2c4f6917-8a75-4514-8f97-27999bb265ean%40googlegroups.com.

Dominic Steinitz

unread,
Feb 7, 2024, 9:46:05 AMFeb 7
to sage-support
Great thanks very much - I copied from the example - I guess I should have checked the manual - I wonder if there is some way of making sure the examples are always up to date.

Eric Gourgoulhon

unread,
Feb 7, 2024, 10:00:07 AMFeb 7
to sage-support
Hi,

Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :
Great thanks very much - I copied from the example - I guess I should have checked the manual - I wonder if there is some way of making sure the examples are always up to date.

Indeed, this notebook is 8 years old and is not at all up to date (there is even Python 2 print commands in it!).
Please open an issue at the Github repository hosting this notebook:
in order for the author to update it.  

I don't know about any automated way to check that the example notebooks are up to date. I am trying to maintain those hosted at
up to date, but the one you are using is not part of them. 
 
By the way, note that since Sage 9.2 an alternative to 
F.exterior_derivative()
is 
diff(F)

Best wishes,

Eric.

Eric Gourgoulhon

unread,
Feb 7, 2024, 1:30:22 PMFeb 7
to sage-support
Le mercredi 7 février 2024 à 16:00:07 UTC+1, Eric Gourgoulhon a écrit :
Indeed, this notebook is 8 years old and is not at all up to date (there is even Python 2 print commands in it!).
Please open an issue at the Github repository hosting this notebook:
in order for the author to update it.  

In order to avoid any further confusion, I've temporarily removed the link to this notebook from 

Any volunteer for providing a nice example notebook about electromagnetism is welcome!
To publish it on the above page, make it publicly accessible (i.e.  readable via nbviewer.org) and send a pull request to 
(or simply send the ipynb file to me)

Eric.

Matthias Koeppe

unread,
Feb 7, 2024, 9:14:14 PMFeb 7
to sage-support
On Wednesday, February 7, 2024 at 7:00:07 AM UTC-8 Eric Gourgoulhon wrote:
I don't know about any automated way to check that the example notebooks are up to date.

One can use "jupyter nbconvert --to notebook --execute" for this

 

Dominic Steinitz

unread,
Feb 8, 2024, 7:46:19 AMFeb 8
to sage-support
I volunteer

Eric Gourgoulhon

unread,
Feb 8, 2024, 1:32:13 PMFeb 8
to sage-support
Thank you for the tip!
Best wishes,

Eric. 

Eric Gourgoulhon

unread,
Feb 8, 2024, 1:33:20 PMFeb 8
to sage-support
Le jeudi 8 février 2024 à 13:46:19 UTC+1, Dominic Steinitz a écrit :
I volunteer

Excellent!  Thank you!
Best wishes,

Eric. 
Reply all
Reply to author
Forward
0 new messages