cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

Cannot run sage from command line: AttributeError: 'Namespace' object has no attribute '_flags' #661

Closed DrBanana419 closed 2 years ago

DrBanana419 commented 2 years ago

I could run sage before but I think this is happening after an update (I'm not sure). I deselected sage, depcleaned, and re-emerged it but still get the same problem. It should be noted that I can run sage -n jupyter without issues. Here is the full error: ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.4, Release Date: 2021-08-22 │ │ Using Python 3.9.8. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ Traceback (most recent call last): File "/usr/lib/python-exec/python3.9/sage-ipython", line 15, in <module> app.initialize() File "/usr/lib/python3.9/site-packages/traitlets/config/application.py", line 87, in inner return method(app, *args, **kwargs) File "/usr/lib/python3.9/site-packages/IPython/terminal/ipapp.py", line 308, in initialize super(TerminalIPythonApp, self).initialize(argv) File "/usr/lib/python3.9/site-packages/traitlets/config/application.py", line 87, in inner return method(app, *args, **kwargs) File "/usr/lib/python3.9/site-packages/IPython/core/application.py", line 450, in initialize self.parse_command_line(argv) File "/usr/lib/python3.9/site-packages/IPython/terminal/ipapp.py", line 303, in parse_command_line return super(TerminalIPythonApp, self).parse_command_line(argv) File "/usr/lib/python3.9/site-packages/traitlets/config/application.py", line 87, in inner return method(app, *args, **kwargs) File "/usr/lib/python3.9/site-packages/traitlets/config/application.py", line 708, in parse_command_line self.cli_config = deepcopy(loader.load_config()) File "/usr/lib/python3.9/site-packages/traitlets/config/loader.py", line 847, in load_config self._parse_args(argv) File "/usr/lib/python3.9/site-packages/traitlets/config/loader.py", line 906, in _parse_args self.parsed_data = self.parser.parse_args(to_parse) File "/usr/lib/python3.9/argparse.py", line 1822, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.9/site-packages/traitlets/config/loader.py", line 770, in parse_known_args return super().parse_known_args(args, namespace) File "/usr/lib/python3.9/argparse.py", line 1850, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.9/argparse.py", line 2064, in _parse_known_args start_index = consume_optional(start_index) File "/usr/lib/python3.9/argparse.py", line 2004, in consume_optional take_action(action, args, option_string) File "/usr/lib/python3.9/argparse.py", line 1932, in take_action action(self, namespace, argument_values, option_string) File "/usr/lib/python3.9/site-packages/traitlets/config/loader.py", line 931, in __call__ namespace._flags.append(self.flag) AttributeError: 'Namespace' object has no attribute '_flags'

kiwifb commented 2 years ago

Yes, I have seen that. I believe that's something missed in the recent stabilisation of jupyter/ipython stuff. You need dev-python/traitlets-5.1.1.

DrBanana419 commented 2 years ago

Yes, I have seen that. I believe that's something missed in the recent stabilisation of jupyter/ipython stuff. You need dev-python/traitlets-5.1.1.

Thanks! How will I know when to go back to the stable version of dev-python/traitlets?

kiwifb commented 2 years ago

That's a bit of an issue. You have to pay attention. I personally keyworded

~dev-python/traitlets-5.1.1

on my system so that only that version and any -r# versions can be from unstable. Once later versions will be released, it is just an inconsequential piece of rubbish to clean up in my /etc/portage/ folder.

kiwifb commented 2 years ago

I have decided to include it in the sage keywords files for now.