[sage-support] Re: Unable to check out trac tickets
I followed the instructions on https://stackoverflow.com/a/18238322 and it seems to be working so far. I lost all my local branches, but I don't mind. On Monday, July 24, 2017 at 8:01:03 PM UTC-5, Zachary Gershkoff wrote: > > I tried to create a new ticket and link it to an existing local branch > using git-trac. The trac ticket was created, but attaching a local branch > to it failed. I tried checking out the ticket that it created (23536) and > this happened: > > zgersh2@helmholtz:~/sage$ git trac checkout 23536 > Loading ticket #23536... > Newly created local branch: t/23536/transversal_matroids > Traceback (most recent call last): > File "/U1/accounts/zgersh2/git-trac-command/bin/git-trac", line 18, in > > cmdline.launch() > File "/U1/accounts/zgersh2/git-trac-command/git_trac/cmdline.py", line > 215, in launch > app.checkout(args.ticket_or_branch, args.branch_name) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/app.py", line 116, > in checkout > self._checkout_ticket(int(ticket_or_branch), branch_name) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/app.py", line 134, > in _checkout_ticket > self.repo.create(local) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_repository.py", > line 145, in create > self.git.fetch('trac', starting_branch) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_interface.py", > line 341, in meth > return self.execute(git_cmd, *args, **kwds) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_interface.py", > line 328, in execute > popen_stderr=subprocess.PIPE) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_interface.py", > line 263, in _run > raise GitError(result) > git_trac.git_error.GitError: git returned with non-zero exit code (1) when > executing "git fetch trac develop" > STDERR: error: garbage at end of loose object > '20d0fd3d389aeea9ad4b9b91cfeeab9f03607478' > STDERR: fatal: loose object 20d0fd3d389aeea9ad4b9b91cfeeab9f03607478 > (stored in .git/objects/20/d0fd3d389aeea9ad4b9b91cfeeab9f03607478) is > corrupt > STDERR: error: git://trac.sagemath.org/sage.git did not send all > necessary objects > STDERR: > > I'm not sure what to do here. Apparently I have to take out some garbage > before uploading my changes? > > For what it's worth, the branch "t/23536/transveral_matroids" was not > actually created, since it doesn't show up when I use "git branch". > > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Unable to check out trac tickets
This error with "garbage at end of loose object" is coming back to plague me. I recently tried to upgrade sage by pulling the develop branch, but I couldn't. zgersh2@helmholtz:~/sage$ git checkout develop Switched to branch 'develop' zgersh2@helmholtz:~/sage$ git pull remote: Counting objects: 3375, done. remote: Compressing objects: 100% (682/682), done. remote: Total 3375 (delta 2860), reused 3192 (delta 2678), pack-reused 0 Receiving objects: 100% (3375/3375), 790.77 KiB | 247 KiB/s, done. error: garbage at end of loose object '20d0fd3d389aeea9ad4b9b91cfeeab9f03607478' fatal: loose object 20d0fd3d389aeea9ad4b9b91cfeeab9f03607478 (stored in .git/objects/20/d0fd3d389aeea9ad4b9b91cfeeab9f03607478) is corrupt fatal: index-pack failed What can I do, short of deleting everything and cloning the entire repository again? On Monday, July 24, 2017 at 8:01:03 PM UTC-5, Zachary Gershkoff wrote: > > I tried to create a new ticket and link it to an existing local branch > using git-trac. The trac ticket was created, but attaching a local branch > to it failed. I tried checking out the ticket that it created (23536) and > this happened: > > zgersh2@helmholtz:~/sage$ git trac checkout 23536 > Loading ticket #23536... > Newly created local branch: t/23536/transversal_matroids > Traceback (most recent call last): > File "/U1/accounts/zgersh2/git-trac-command/bin/git-trac", line 18, in > > cmdline.launch() > File "/U1/accounts/zgersh2/git-trac-command/git_trac/cmdline.py", line > 215, in launch > app.checkout(args.ticket_or_branch, args.branch_name) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/app.py", line 116, > in checkout > self._checkout_ticket(int(ticket_or_branch), branch_name) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/app.py", line 134, > in _checkout_ticket > self.repo.create(local) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_repository.py", > line 145, in create > self.git.fetch('trac', starting_branch) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_interface.py", > line 341, in meth > return self.execute(git_cmd, *args, **kwds) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_interface.py", > line 328, in execute > popen_stderr=subprocess.PIPE) > File "/U1/accounts/zgersh2/git-trac-command/git_trac/git_interface.py", > line 263, in _run > raise GitError(result) > git_trac.git_error.GitError: git returned with non-zero exit code (1) when > executing "git fetch trac develop" > STDERR: error: garbage at end of loose object > '20d0fd3d389aeea9ad4b9b91cfeeab9f03607478' > STDERR: fatal: loose object 20d0fd3d389aeea9ad4b9b91cfeeab9f03607478 > (stored in .git/objects/20/d0fd3d389aeea9ad4b9b91cfeeab9f03607478) is > corrupt > STDERR: error: git://trac.sagemath.org/sage.git did not send all > necessary objects > STDERR: > > I'm not sure what to do here. Apparently I have to take out some garbage > before uploading my changes? > > For what it's worth, the branch "t/23536/transveral_matroids" was not > actually created, since it doesn't show up when I use "git branch". > > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Calling java classes from Sage using Py4J
That's it! You're recommendation worked like a charm. I certainly didn't appreciate the differences between Sage type and python number types. Thank you John - very much appreciated. Paul sage: *from* *py4j.java_gateway* *import* JavaGateway sage: gateway = JavaGateway() sage: random = gateway.jvm.java.util.Random() sage: number1 = random.nextInt(int(*10*)) sage: number1 4 On Wednesday, August 2, 2017 at 3:37:15 PM UTC-4, John H Palmieri wrote: > > In Sage, "10" is a Sage integer, not a Python int. I am guessing that > gateway.jvm.java.util.Random.nextInt > expects a Python int for its input, and when it gets a Sage Integer, that > causes a problem. What happens if you replace "random.nextInt(10)" with > "random.nextInt(int(10))"? > > > > > On Wednesday, August 2, 2017 at 12:16:54 PM UTC-7, Paul DesJardin wrote: >> >> Hi, I'm new to using Sage and trying to interface to java classes using >> py4j. I've been successful using py4j using an anaconda installed version >> of python (on a mac) but I'm running into Attribute errors using Sage. The >> one below is 'sage.rings.integer.Integer' object has no attribute >> '_get_object_id'. I don't understand the reason for the differences and >> how to interpret the errors I'm receiving. Any assistance or ideas of what >> is causing this would be very much appreciated. Thank you, PD >> >> >> >> >> sage: *from* *py4j.java_gateway* *import* JavaGateway >> >> sage: gateway = JavaGateway() >> >> sage: random = gateway.jvm.java.util.Random() >> >> sage: number1 = random.nextInt(*10*) >> >> >> --- >> >> AttributeErrorTraceback (most recent call >> last) >> >> in () >> >> > 1 number1 = random.nextInt(Integer(10)) >> >> >> >> /Applications/SageMath/local/lib/python2.7/site-packages/py4j/java_gateway.pyc >> >> in __call__(self, *args) >> >> * 1149* >> >> * 1150* def __call__(self, *args): >> >> -> 1151 args_command, temp_args = self._build_args(*args) >> >> * 1152* >> >> * 1153* command = proto.CALL_COMMAND_NAME +\ >> >> >> >> /Applications/SageMath/local/lib/python2.7/site-packages/py4j/java_gateway.pyc >> >> in _build_args(self, *args) >> >> * 1119* >> >> * 1120* args_command = "".join( >> >> -> 1121 [get_command_part(arg, self.pool) for arg in >> new_args]) >> >> * 1122* >> >> * 1123* return args_command, temp_args >> >> >> /Applications/SageMath/local/lib/python2.7/site-packages/py4j/protocol.pyc >> in get_command_part(parameter, python_proxy_pool) >> >> *288* command_part += ";" + interface >> >> *289* else: >> >> --> 290 command_part = REFERENCE_TYPE + parameter._get_object_id >> () >> >> *291* >> >> *292* command_part += "\n" >> >> >> /Applications/SageMath/src/sage/structure/element.pyx in >> sage.structure.element.Element.__getattr__ >> (/Applications/SageMath/src/build/cythonized/sage/structure/element.c:4230) >> () >> >> *457* AttributeError: >> 'LeftZeroSemigroup_with_category.element_class' object has no attribute >> 'blah_blah' >> >> *458* """ >> >> --> 459 return self.getattr_from_category(name) >> >> *460* >> >> *461* cdef getattr_from_category(self, name): >> >> >> /Applications/SageMath/src/sage/structure/element.pyx in >> sage.structure.element.Element.getattr_from_category >> (/Applications/SageMath/src/build/cythonized/sage/structure/element.c:4339) >> () >> >> *470* else: >> >> *471* cls = P._abstract_element_class >> >> --> 472 return getattr_from_other_class(self, cls, name) >> >> *473* >> >> *474* def __dir__(self): >> >> >> /Applications/SageMath/src/sage/structure/misc.pyx in >> sage.structure.misc.getattr_from_other_class >> (/Applications/SageMath/src/build/cythonized/sage/structure/misc.c:1933) >> () >> >> *297* dummy_error_message.cls = type(self) >> >> *298* dummy_error_message.name = name >> >> --> 299 raise dummy_attribute_error >> >> *300* attribute = attr >> >> *301* # Check for a descriptor (__get__ in Python) >> >> >> AttributeError: 'sage.rings.integer.Integer' object has no attribute >> '_get_object_id' >> > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Calling java classes from Sage using Py4J
In Sage, "10" is a Sage integer, not a Python int. I am guessing that gateway.jvm.java.util.Random.nextInt expects a Python int for its input, and when it gets a Sage Integer, that causes a problem. What happens if you replace "random.nextInt(10)" with "random.nextInt(int(10))"? On Wednesday, August 2, 2017 at 12:16:54 PM UTC-7, Paul DesJardin wrote: > > Hi, I'm new to using Sage and trying to interface to java classes using > py4j. I've been successful using py4j using an anaconda installed version > of python (on a mac) but I'm running into Attribute errors using Sage. The > one below is 'sage.rings.integer.Integer' object has no attribute > '_get_object_id'. I don't understand the reason for the differences and > how to interpret the errors I'm receiving. Any assistance or ideas of what > is causing this would be very much appreciated. Thank you, PD > > > > > sage: *from* *py4j.java_gateway* *import* JavaGateway > > sage: gateway = JavaGateway() > > sage: random = gateway.jvm.java.util.Random() > > sage: number1 = random.nextInt(*10*) > > --- > > AttributeErrorTraceback (most recent call > last) > > in () > > > 1 number1 = random.nextInt(Integer(10)) > > > > /Applications/SageMath/local/lib/python2.7/site-packages/py4j/java_gateway.pyc > > in __call__(self, *args) > > * 1149* > > * 1150* def __call__(self, *args): > > -> 1151 args_command, temp_args = self._build_args(*args) > > * 1152* > > * 1153* command = proto.CALL_COMMAND_NAME +\ > > > > /Applications/SageMath/local/lib/python2.7/site-packages/py4j/java_gateway.pyc > > in _build_args(self, *args) > > * 1119* > > * 1120* args_command = "".join( > > -> 1121 [get_command_part(arg, self.pool) for arg in > new_args]) > > * 1122* > > * 1123* return args_command, temp_args > > > /Applications/SageMath/local/lib/python2.7/site-packages/py4j/protocol.pyc > in get_command_part(parameter, python_proxy_pool) > > *288* command_part += ";" + interface > > *289* else: > > --> 290 command_part = REFERENCE_TYPE + parameter._get_object_id() > > *291* > > *292* command_part += "\n" > > > /Applications/SageMath/src/sage/structure/element.pyx in > sage.structure.element.Element.__getattr__ > (/Applications/SageMath/src/build/cythonized/sage/structure/element.c:4230) > () > > *457* AttributeError: > 'LeftZeroSemigroup_with_category.element_class' object has no attribute > 'blah_blah' > > *458* """ > > --> 459 return self.getattr_from_category(name) > > *460* > > *461* cdef getattr_from_category(self, name): > > > /Applications/SageMath/src/sage/structure/element.pyx in > sage.structure.element.Element.getattr_from_category > (/Applications/SageMath/src/build/cythonized/sage/structure/element.c:4339) > () > > *470* else: > > *471* cls = P._abstract_element_class > > --> 472 return getattr_from_other_class(self, cls, name) > > *473* > > *474* def __dir__(self): > > > /Applications/SageMath/src/sage/structure/misc.pyx in > sage.structure.misc.getattr_from_other_class > (/Applications/SageMath/src/build/cythonized/sage/structure/misc.c:1933)() > > *297* dummy_error_message.cls = type(self) > > *298* dummy_error_message.name = name > > --> 299 raise dummy_attribute_error > > *300* attribute = attr > > *301* # Check for a descriptor (__get__ in Python) > > > AttributeError: 'sage.rings.integer.Integer' object has no attribute > '_get_object_id' > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Calling java classes from Sage using Py4J
Hi, I'm new to using Sage and trying to interface to java classes using py4j. I've been successful using py4j using an anaconda installed version of python (on a mac) but I'm running into Attribute errors using Sage. The one below is 'sage.rings.integer.Integer' object has no attribute '_get_object_id'. I don't understand the reason for the differences and how to interpret the errors I'm receiving. Any assistance or ideas of what is causing this would be very much appreciated. Thank you, PD sage: *from* *py4j.java_gateway* *import* JavaGateway sage: gateway = JavaGateway() sage: random = gateway.jvm.java.util.Random() sage: number1 = random.nextInt(*10*) --- AttributeErrorTraceback (most recent call last) in () > 1 number1 = random.nextInt(Integer(10)) /Applications/SageMath/local/lib/python2.7/site-packages/py4j/java_gateway.pyc in __call__(self, *args) * 1149* * 1150* def __call__(self, *args): -> 1151 args_command, temp_args = self._build_args(*args) * 1152* * 1153* command = proto.CALL_COMMAND_NAME +\ /Applications/SageMath/local/lib/python2.7/site-packages/py4j/java_gateway.pyc in _build_args(self, *args) * 1119* * 1120* args_command = "".join( -> 1121 [get_command_part(arg, self.pool) for arg in new_args]) * 1122* * 1123* return args_command, temp_args /Applications/SageMath/local/lib/python2.7/site-packages/py4j/protocol.pyc in get_command_part(parameter, python_proxy_pool) *288* command_part += ";" + interface *289* else: --> 290 command_part = REFERENCE_TYPE + parameter._get_object_id() *291* *292* command_part += "\n" /Applications/SageMath/src/sage/structure/element.pyx in sage.structure.element.Element.__getattr__ (/Applications/SageMath/src/build/cythonized/sage/structure/element.c:4230) () *457* AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah' *458* """ --> 459 return self.getattr_from_category(name) *460* *461* cdef getattr_from_category(self, name): /Applications/SageMath/src/sage/structure/element.pyx in sage.structure.element.Element.getattr_from_category (/Applications/SageMath/src/build/cythonized/sage/structure/element.c:4339) () *470* else: *471* cls = P._abstract_element_class --> 472 return getattr_from_other_class(self, cls, name) *473* *474* def __dir__(self): /Applications/SageMath/src/sage/structure/misc.pyx in sage.structure.misc.getattr_from_other_class (/Applications/SageMath/src/build/cythonized/sage/structure/misc.c:1933)() *297* dummy_error_message.cls = type(self) *298* dummy_error_message.name = name --> 299 raise dummy_attribute_error *300* attribute = attr *301* # Check for a descriptor (__get__ in Python) AttributeError: 'sage.rings.integer.Integer' object has no attribute '_get_object_id' -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Sage_crash_report
Could you give details on: - your precise operating system version - how did you install Sage On 02/08/2017 11:41, 张彪 wrote: -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Sage_crash_report
-- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. *** IPython post-mortem report {'commit_hash': u'', 'commit_source': '(none found)', 'default_encoding': 'UTF-8', 'ipython_path': '/usr/lib/python2.7/site-packages/IPython', 'ipython_version': '5.3.0', 'os_name': 'posix', 'platform': 'Linux-4.11.9-1-ARCH-x86_64-with-glibc2.2.5', 'sys_executable': '/usr/bin/python2', 'sys_platform': 'linux2', 'sys_version': '2.7.13 (default, Jul 21 2017, 03:24:34) \n[GCC 7.1.1 20170630]'} *** *** Crash traceback: --- --- ImportError Python 2.7.13: /usr/bin/python2 Wed Aug 2 17:37:12 2017 A problem occurred executing Python code. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call last. /usr/bin/sage-ipython in () 1 #!/usr/bin/env python2 2 # -*- coding: utf-8 -*- 3 """ 4 Sage IPython startup script. 5 """ 6 7 from sage.repl.interpreter import SageTerminalApp 8 9 app = SageTerminalApp.instance() ---> 10 app.initialize() global app.initialize = > 11 app.start() in initialize(self=, argv=None) /usr/lib/python2.7/site-packages/traitlets/config/application.pyc in catch_config_error(method=, app=, *args=(None,), **kwargs={}) 72 TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR = False 73 else: 74 raise ValueError("Unsupported value for environment variable: 'TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR' is set to '%s' which is none of {'0', '1', 'false', 'true', ''}."% _envvar ) 75 76 77 @decorator 78 def catch_config_error(method, app, *args, **kwargs): 79 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init. 80 81 On a TraitError (generally caused by bad config), this will print the trait's 82 message, and exit the app. 83 84 For use on init methods, to prevent invoking excepthook on invalid input. 85 """ 86 try: ---> 87 return method(app, *args, **kwargs) method = app = args = (None,) kwargs = {} 88 except (TraitError, ArgumentError) as e: 89 app.print_help() 90 app.log.fatal("Bad config encountered during initialization:") 91 app.log.fatal(str(e)) 92 app.log.debug("Config at the time: %s", app.config) 93 app.exit(1) 94 95 96 class ApplicationError(Exception): 97 pass 98 99 100 class LevelFormatter(logging.Formatter): 101 """Formatter with additional `highlevel` record 102 /usr/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=, argv=None) 294 295 return super(TerminalIPythonApp, self).parse_command_line(argv) 296 297 @catch_config_error 298 def initialize(self, argv=None): 299 """Do actions after construct, but before starting the app.""" 300 super(TerminalIPythonApp, self).initialize(argv) 301 if self.subapp is not None: 302 # don't bother initializing further, starting subapp 303 return 304 # print self.extra_args 305 if self.extra_args and not self.something_to_run: 306 self.file_to_run = self.extra_args[0] 307 self.init_path() 308 # create the shell --> 309 self.init_shell() self.init_shell = > 310 # and draw the banner 311 self.init_banner() 312 # Now a variety of things that happen after the banner is printed. 313 self.init_gui_pylab() 314 self.init_extensions() 315 self.init_code() 316 317 def init_shell(self): 318 """initialize the InteractiveShell instance""" 319 # Create an InteractiveShell instance. 320 # shell.display_banner should always be False for the terminal 321 # based app, because we call shell.show_banner() by hand below 322 # so the banner shows *before* all extension loading stuff. 323
[sage-support] Re: mpfr build crashes
These lines in the log look strange: checking for ld used by gcc... /usr/lib/gcc/x86_64-linux-gnu/4.8 checking if the linker (/usr/lib/gcc/x86_64-linux-gnu/4.8) is GNU ld... no That is, from the mpfr's point of view, the linker does not work, thus the result. On Wednesday, August 2, 2017 at 1:52:18 AM UTC+1, ps wrote: > > > > Building Sage 8-0 on Ubuntu 14.04.5. Build of mpfr does not finish; the > libmpfr.so.4.1.5 is not created. > Possible fixes? > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.