Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error with metric

Hi,

I am learning Sage Math and Sage Manifolds. As in the reference manual, I just used the command:

M = Manifold(4, 'M')

g = M.lorentz_metric('g')

Running the second line gave me the following message:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_10.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZyA9IE0ubG9yZW50el9tZXRyaWMoJ2cnKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/hw/dshmtl910nb4nk8_pc8f7ldr0000gn/T/tmptEzTup/___code___.py", line 2, in <module> exec compile(u"g = M.lorentz_metric('g')" + '\n', '', 'single') File "", line 1, in <module>

File "sage/structure/category_object.pyx", line 834, in sage.structure.category_object.CategoryObject.__getattr__ (/Applications/SageMath-7.4.app/Contents/Resources/sage/src/build/cythonized/sage/structure/category_object.c:7515) File "sage/structure/category_object.pyx", line 849, in sage.structure.category_object.CategoryObject.getattr_from_category (/Applications/SageMath-7.4.app/Contents/Resources/sage/src/build/cythonized/sage/structure/category_object.c:7679) File "sage/structure/misc.pyx", line 295, in sage.structure.misc.getattr_from_other_class (/Applications/SageMath-7.4.app/Contents/Resources/sage/src/build/cythonized/sage/structure/misc.c:1697) AttributeError: 'DifferentiableManifold_with_category' object has no attribute 'lorentz_metric'

I appreciate it if somebody would give me some advice. Thanks.

click to hide/show revision 2
retagged

Error with metric

Hi,

I am learning Sage Math and Sage Manifolds. As in the reference manual, I just used the command:

M = Manifold(4, 'M')

g = M.lorentz_metric('g')

Running the second line gave me the following message:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_10.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZyA9IE0ubG9yZW50el9tZXRyaWMoJ2cnKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/hw/dshmtl910nb4nk8_pc8f7ldr0000gn/T/tmptEzTup/___code___.py", line 2, in <module> exec compile(u"g = M.lorentz_metric('g')" + '\n', '', 'single') File "", line 1, in <module>

File "sage/structure/category_object.pyx", line 834, in sage.structure.category_object.CategoryObject.__getattr__ (/Applications/SageMath-7.4.app/Contents/Resources/sage/src/build/cythonized/sage/structure/category_object.c:7515) File "sage/structure/category_object.pyx", line 849, in sage.structure.category_object.CategoryObject.getattr_from_category (/Applications/SageMath-7.4.app/Contents/Resources/sage/src/build/cythonized/sage/structure/category_object.c:7679) File "sage/structure/misc.pyx", line 295, in sage.structure.misc.getattr_from_other_class (/Applications/SageMath-7.4.app/Contents/Resources/sage/src/build/cythonized/sage/structure/misc.c:1697) AttributeError: 'DifferentiableManifold_with_category' object has no attribute 'lorentz_metric'

I appreciate it if somebody would give me some advice. Thanks.