Mars rotation sample submission issue

Hi everyone! Getting an issue while submitting my and sample results. Is this expected?

The following command fails with an error.
!aicrowd submission create -c mars-rotation -f data/sample_submission.csv

sample_submission.csv ━━━━━━━━━━━━━ 100.0% • 97.6/95.9 KB • 865.5 kB/s • 0:00:00
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/local/bin/aicrowd:8 in │
│ │
│ 5 from aicrowd.cli import cli │
│ 6 if name == ‘main’: │
│ 7 │ sys.argv[0] = re.sub(r’(-script.pyw|.exe)?$’, ‘’, sys.argv[0]) │
│ ❱ 8 │ sys.exit(cli()) │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:829 in call
│ │
│ 826 │ │
│ 827 │ def call(self, *args, **kwargs): │
│ 828 │ │ “”“Alias for :meth:main.”"" │
│ ❱ 829 │ │ return self.main(*args, **kwargs) │
│ 830 │
│ 831 │
│ 832 class Command(BaseCommand): │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:782 in main │
│ │
│ 779 │ │ try: │
│ 780 │ │ │ try: │
│ 781 │ │ │ │ with self.make_context(prog_name, args, **extra) as c │
│ ❱ 782 │ │ │ │ │ rv = self.invoke(ctx) │
│ 783 │ │ │ │ │ if not standalone_mode: │
│ 784 │ │ │ │ │ │ return rv │
│ 785 │ │ │ │ │ # it’s not safe to ctx.exit(rv) here! │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:1259 in invoke │
│ │
│ 1256 │ │ │ │ Command.invoke(self, ctx) │
│ 1257 │ │ │ │ sub_ctx = cmd.make_context(cmd_name, args, parent=ctx │
│ 1258 │ │ │ │ with sub_ctx: │
│ ❱ 1259 │ │ │ │ │ return _process_result(sub_ctx.command.invoke(sub │
│ 1260 │ │ │
│ 1261 │ │ # In chain mode we create the contexts step by step, but afte │
│ 1262 │ │ # base command has been invoked. Because at that point we do │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:1259 in invoke │
│ │
│ 1256 │ │ │ │ Command.invoke(self, ctx) │
│ 1257 │ │ │ │ sub_ctx = cmd.make_context(cmd_name, args, parent=ctx │
│ 1258 │ │ │ │ with sub_ctx: │
│ ❱ 1259 │ │ │ │ │ return _process_result(sub_ctx.command.invoke(sub │
│ 1260 │ │ │
│ 1261 │ │ # In chain mode we create the contexts step by step, but afte │
│ 1262 │ │ # base command has been invoked. Because at that point we do │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:1066 in invoke │
│ │
│ 1063 │ │ “”" │
│ 1064 │ │ _maybe_show_deprecated_notice(self) │
│ 1065 │ │ if self.callback is not None: │
│ ❱ 1066 │ │ │ return ctx.invoke(self.callback, **ctx.params) │
│ 1067 │
│ 1068 │
│ 1069 class MultiCommand(Command): │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:610 in invoke │
│ │
│ 607 │ │ args = args[2:] │
│ 608 │ │ with augment_usage_errors(self): │
│ 609 │ │ │ with ctx: │
│ ❱ 610 │ │ │ │ return callback(*args, **kwargs) │
│ 611 │ │
│ 612 │ def forward(*args, **kwargs): # noqa: B902 │
│ 613 │ │ “”“Similar to :meth:invoke but fills in default keyword │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/decorators.py:73 in new_func │
│ │
│ 70 │ │ │ │ │ “Managed to invoke callback without a context” │
│ 71 │ │ │ │ │ " object of type ‘{}’ existing”.format(object_type │
│ 72 │ │ │ │ ) │
│ ❱ 73 │ │ │ return ctx.invoke(f, obj, *args, **kwargs) │
│ 74 │ │ │
│ 75 │ │ return update_wrapper(new_func, f) │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:610 in invoke │
│ │
│ 607 │ │ args = args[2:] │
│ 608 │ │ with augment_usage_errors(self): │
│ 609 │ │ │ with ctx: │
│ ❱ 610 │ │ │ │ return callback(*args, **kwargs) │
│ 611 │ │
│ 612 │ def forward(*args, **kwargs): # noqa: B902 │
│ 613 │ │ “”“Similar to :meth:invoke but fills in default keyword │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/decorators.py:73 in new_func │
│ │
│ 70 │ │ │ │ │ “Managed to invoke callback without a context” │
│ 71 │ │ │ │ │ " object of type ‘{}’ existing”.format(object_type │
│ 72 │ │ │ │ ) │
│ ❱ 73 │ │ │ return ctx.invoke(f, obj, *args, **kwargs) │
│ 74 │ │ │
│ 75 │ │ return update_wrapper(new_func, f) │
│ │
│ /usr/local/lib/python3.7/dist-packages/click/core.py:610 in invoke │
│ │
│ 607 │ │ args = args[2:] │
│ 608 │ │ with augment_usage_errors(self): │
│ 609 │ │ │ with ctx: │
│ ❱ 610 │ │ │ │ return callback(*args, **kwargs) │
│ 611 │ │
│ 612 │ def forward(*args, **kwargs): # noqa: B902 │
│ 613 │ │ “”“Similar to :meth:invoke but fills in default keyword │
│ │
│ /usr/local/lib/python3.7/dist-packages/aicrowd/cmd/submission.py:81 in │
│ create_subcommand │
│ │
│ 78 │ │ │ │ True, │
│ 79 │ │ │ │ config_ctx, │
│ 80 │ │ │ │ challenge_ctx, │
│ ❱ 81 │ │ │ │ jupyter=jupyter, │
│ 82 │ │ │ ) │
│ 83 │ │ ) │
│ 84 │ except SubmissionException as e: │
│ │
│ /usr/local/lib/python3.7/dist-packages/aicrowd/submission/create_cmd.py:90 │
│ in create │
│ │
│ 87 │ if file_path is None: │
│ 88 │ │ raise NotImplementedError(“Git based submissions are not ready │
│ 89 │ │
│ ❱ 90 │ return submit_file(challenge_slug, file_path, description, api_key, │
│ │
│ /usr/local/lib/python3.7/dist-packages/aicrowd/submission/helpers.py:356 in │
│ submit_file │
│ │
│ 353 │ │
│ 354 │ if print_links: │
│ 355 │ │ print_submission_links( │
│ ❱ 356 │ │ │ challenge_slug, response.get(“data”, {}).get(“submission_i │
│ 357 │ │ ) │
│ 358 │ │
│ 359 │ return response.get(“data”) │
│ │
│ /usr/local/lib/python3.7/dist-packages/aicrowd/submission/helpers.py:289 in │
│ print_submission_links │
│ │
│ 286 │ ) │
│ 287 │ table.add_row(“Challenge page”, f”{challenge_url}”) │
│ 288 │ │
│ ❱ 289 │ width = calculate_min_table_width(table) │
│ 290 │ │
│ 291 │ console = Console(width=width) │
│ 292 │ table.min_width = width │
│ │
│ /usr/local/lib/python3.7/dist-packages/aicrowd/submission/helpers.py:53 in │
│ calculate_min_table_width │
│ │
│ 50 │ Args: │
│ 51 │ │ table: rich table │
│ 52 │ “”” │
│ ❱ 53 │ width = sum(table._calculate_column_widths(Console(), 200)) + tabl │
│ 54 │ term_width = shutil.get_terminal_size().columns │
│ 55 │ return max(width, term_width) │
│ │
│ /usr/local/lib/python3.7/dist-packages/rich/table.py:478 in │
│ _calculate_column_widths │
│ │
│ 475 │ │ self, console: “Console”, options: “ConsoleOptions” │
│ 476 │ ) -> List[int]: │
│ 477 │ │ “”"Calculate the widths of each column, including padding, not │
│ ❱ 478 │ │ max_width = options.max_width │
│ 479 │ │ columns = self.columns │
│ 480 │ │ width_ranges = [ │
│ 481 │ │ │ self._measure_column(console, options, column) for column │
╰──────────────────────────────────────────────────────────────────────────────╯
AttributeError: ‘int’ object has no attribute ‘max_width’

1 Like

Hi @boris_kopin,

This was an error due to a mismatch of a package version in one of the aicrowd-cli modules. We have fixed it. You can upgrade the cli version using

pip install -U aicrowd-cli

Let us know if you face any more problems.

Cheers
Ayush

2 Likes