IndexError when calling transcrypt from a shell script

オープン
#509 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python, shell
領域
cli, compilers

調査の方向性

Start with the traceback locations in transcrypt/main.py, org/transcrypt/compiler.py, and org/transcrypt/utils.py, then reproduce the shell-script invocation that produces the mypy and IndexError messages. The fix is complete when this input reports the underlying problem without crashing while formatting the error; add or update a regression test if the repository provides one.

索引モデルが issue の本文から書いたものです。

説明

Output when attempting to execute from a shell script:
I may be missing something obvious here.

Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.6.101
Copyright (C) Geatec Engineering. License: Apache 2.0

Performing static type validation on application: /home/user/Documents/example/src/index.py
Problems encountered during static type check
	mypy: can't read file '/home/user/Documents/example/src/i': No such file or directory
	


list index out of rangeTraceback (most recent call last):
  File "/home/user/.virtualenvs/transcrypt-test/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/compiler.py", line 167, in __init__
    moduleMetadata = ModuleMetadata (self, self.mainModuleName)
  File "/home/user/.virtualenvs/transcrypt-test/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/compiler.py", line 68, in __init__
    '\n\tCan\'t find any of:\n\t\t{}\n'.format ('\n\t\t'. join (searchedModulePaths))
org.transcrypt.utils.Error: <unprintable Error object>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.virtualenvs/transcrypt-test/lib/python3.6/site-packages/transcrypt/__main__.py", line 159, in main
    compiler.Program (transpilationDirs, modulesDir, __symbols__)
  File "/home/user/.virtualenvs/transcrypt-test/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/compiler.py", line 172, in __init__
    message = '\n\t{}'.format (str (exception))
  File "/home/user/.virtualenvs/transcrypt-test/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/utils.py", line 150, in __str__
    result += '\n\tFile \'{}\', line {}, namely:'.format (program.importStack [-1][0] .sourcePath, self.lineNr)
IndexError: list index out of range


Aborted
主要言語
Python
スター
2.9k
フォーク
218
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TranscryptOrg/Transcrypt のほかの issue

TranscryptOrg/Transcrypt の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。