Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atcoder_config の upload_script を相対パスで指定できない #94

Open
sotanishy opened this issue Jan 13, 2024 · 0 comments
Open

Comments

@sotanishy
Copy link

現状, upload_script を絶対パスで指定しないと動きませんが, base_dir からの相対パスで指定できると嬉しいです.

相対パスを指定して rime upload を dry-run すると,以下のコードの 216 行目で AttributeError: 'NoneType' object has no attribute 'startswith' が生じます.

script = os.path.join(problem.project.atcoder_upload_script)
if not os.path.exists(os.path.join(problem.project.base_dir, script)):
ui.errors.Error(problem, script + ' is not found.')
yield False
stmp = files.ReadFile(script)
if not stmp.startswith('#!/usr/bin/php'):
ui.errors.Error(problem, script + ' is not an upload script.')
yield False

211 行目の if 文はスクリプトのパスが base_dir と join されるので通りますが,次の 215 行目では join されていないので,スクリプトが読み込めていないのだと考えます.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant