[sage-support] Sage Crash Report

2016-03-29 Thread Oscar Alberto Castillo Felisola
Dear community, 

lately, I'm having problems with the installation of SAGE. I downloaded the 
version Sage v.7.1 for Debian_8, and it seems to work... but I installed 
sagemanifold v.0.9, and I got the report file attached to this post.

I'm having problems too when compiling the scr code, because the file 
`flint*` has a problem.

Any suggestions?

-- 
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'7f50c6b',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': 
'/home/oscar/Software/SageMath/local/lib/python2.7/site-packages/IPython',
 'ipython_version': '4.1.2',
 'os_name': 'posix',
 'platform': 'Linux-3.16.0-4-amd64-x86_64-with-debian-8.3',
 'sys_executable': '/home/oscar/Software/SageMath/local/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.10 (default, Mar 22 2016, 15:57:51) \n[GCC 4.9.3]'}

***



***

Crash traceback:

---
---
ImportError   Python 2.7.10: /home/oscar/Software/SageMath/local/bin/python
   Tue Mar 29 10:58:32 2016
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.
/home/oscar/Software/SageMath/src/bin/sage-ipython in ()
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6 
  7 # Install extra readline commands before IPython initialization
  8 from sage.repl.readline_extra_commands import *
  9 
 10 from sage.repl.interpreter import SageTerminalApp
 11 
 12 app = SageTerminalApp.instance()
---> 13 app.initialize()
global app.initialize = >
 14 app.start()

 in initialize(self=, argv=None)

/home/oscar/Software/SageMath/local/lib/python2.7/site-packages/traitlets/config/application.py
 in catch_config_error(method=, 
app=, *args=(None,), **kwargs={})
 59 
 60 
#-
 61 # Application class
 62 
#-
 63 
 64 @decorator
 65 def catch_config_error(method, app, *args, **kwargs):
 66 """Method decorator for catching invalid config 
(Trait/ArgumentErrors) during init.
 67 
 68 On a TraitError (generally caused by bad config), this will print 
the trait's
 69 message, and exit the app.
 70 
 71 For use on init methods, to prevent invoking excepthook on invalid 
input.
 72 """
 73 try:
---> 74 return method(app, *args, **kwargs)
method = 
app = 
args = (None,)
kwargs = {}
 75 except (TraitError, ArgumentError) as e:
 76 app.print_help()
 77 app.log.fatal("Bad config encountered during initialization:")
 78 app.log.fatal(str(e))
 79 app.log.debug("Config at the time: %s", app.config)
 80 app.exit(1)
 81 
 82 
 83 class ApplicationError(Exception):
 84 pass
 85 
 86 
 87 class LevelFormatter(logging.Formatter):
 88 """Formatter with additional `highlevel` record
 89 

/home/oscar/Software/SageMath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.py
 in initialize(self=, argv=None)
291 
292 return super(TerminalIPythonApp, self).parse_command_line(argv)
293 
294 @catch_config_error
295 def initialize(self, argv=None):
296 """Do actions after construct, but before starting the app."""
297 super(TerminalIPythonApp, self).initialize(argv)
298 if self.subapp is not None:
299 # don't bother initializing further, starting subapp
300 return
301 # print self.extra_args
302 if self.extra_args and not self.something_to_run:
303 self.file_to_run = self.extra_args[0]
304 self.init_path()
305 # create the shell
--> 306 self.init_shell()
self.init_shell = >
307 # and draw the banner
308 self.init_banner()
309 # Now a variety of 

Re: [sage-support] reasons for the strange behaviour of Permutations

2016-03-29 Thread Vincent Delecroix

This is indeed a bug! Thanks for the report.

The thing is that the code for cardinality (before the call to .list()) 
is inherited from permutations without a fixed length. The (wrong) 
number you got (1680) is actually the number of permutations without 
length restriction.


See

   http://trac.sagemath.org/ticket/20317

By the way you would better use Permutations(ms, 3) rather than 
importing Permutations_msetk.


Vincent

On 29/03/16 09:41, Karol Suchan wrote:

Hi,

I've spotted a strange behaviour of Permutations.cardinality(): first it
reports a weird number, but after a call to list() it gets ok. Any reason
why?

I copy a code that compares the behaviour of Tuples, Permutations and
Arrangements.

%%%
from sage.combinat.permutation import *
from sage.combinat.tuple import *

ms=[1,1,1,2,2,2,3,3,3]

tms = Tuples(ms,3)
pms = Permutations_msetk(ms,3)
ams = Arrangements_msetk(ms,3)

print("ctms: " + str(tms.cardinality()))
print("cpms: " + str(pms.cardinality()))
print("cams: " + str(ams.cardinality()))

print("ltms: " + str(tms.list()))
print("lpms: " + str(pms.list()))
print("lams: " + str(ams.list()))

print("ctms: " + str(tms.cardinality()))
print("cpms: " + str(pms.cardinality()))
print("cams: " + str(ams.cardinality()))
%%%

Best,
Karol



--
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.