question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Runtime error on Python 3.5.2

See original GitHub issue

Python3.5.2 で実行したんですが、以下のようなエラーで、動作しないです。 (最近online-judge-toolsアップデートしてなかった。)

Traceback (most recent call last):
  File "/home/ryo/workspace/github/chainer-wind-env/bin/oj", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/ryo/workspace/github/online-judge-tools/oj", line 4, in <module>
    import onlinejudge._implementation.main
  File "/home/ryo/workspace/github/online-judge-tools/onlinejudge/__init__.py", line 3, in <module>
    import onlinejudge.service
  File "/home/ryo/workspace/github/online-judge-tools/onlinejudge/service/__init__.py", line 2, in <module>
    import onlinejudge.service.anarchygolf
  File "/home/ryo/workspace/github/online-judge-tools/onlinejudge/service/anarchygolf.py", line 14, in <module>
    import onlinejudge._implementation.testcase_zipper
  File "/home/ryo/workspace/github/online-judge-tools/onlinejudge/_implementation/testcase_zipper.py", line 9, in <module>
    import onlinejudge._implementation.format_utils
  File "/home/ryo/workspace/github/online-judge-tools/onlinejudge/_implementation/format_utils.py", line 11, in <module>
    import onlinejudge._implementation.utils as utils
  File "/home/ryo/workspace/github/online-judge-tools/onlinejudge/_implementation/utils.py", line 215, in <module>
    def getter_with_load_details(name: str, type: Union[str, Type]) -> Callable:
  File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/usr/lib/python3.5/typing.py", line 512, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 1077, in __subclasscheck__
    if super().__subclasscheck__(cls):
  File "/home/ryo/workspace/github/chainer-wind-env/lib/python3.5/abc.py", line 225, in __subclasscheck__
    for scls in cls.__subclasses__():
TypeError: descriptor '__subclasses__' of 'type' object needs an argument

def getter_with_load_details(name: str, type: Union[str, Type]) -> Callable:の型アノテーション止めると動作します。(Unionの方)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kmykcommented, Mar 8, 2019

とりあえず 3.5.0 を指定する形でプルリクを出しました

0reactions
fukatanicommented, Mar 8, 2019

あまりそこまでやっているリポジトリを見かけませんが、kmykさんがそうしたいなら私はOKです。 あるいは我々Python3.5.2ユーザーにアップデートを迫ってもらってもかまいません。

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix updated pip: RuntimeError: Python 3.5 or later is ...
Looks like you upgraded pip to a version that doesn't support your Python version. Uninstall pip and reinstall the system pip:
Read more >
Runtimeerror (python 3.5 or later is required) when I try to ...
You seem to have Python 3.4 installed. Update it to 3.5 and try again. setuptools dropped support for Python 3.4 as it is...
Read more >
Python version >= 3.5 required. · Issue #6667 · pypa/pip - GitHub
This error is originating from setuptools 's logic for handling setup_requires . This was a mechanism that existed to help ensure dependencies ...
Read more >
[PYTHON-2507] Workaround pip install failure: RuntimeError
The problem there is that pip is so old it happily installs a version which doesn't support 3.4 anymore. Since pip 2.1 will...
Read more >
Built-in Exceptions — Python 3.11.1 documentation
This exception is derived from RuntimeError . It is raised when the interpreter detects that the maximum recursion depth (see sys.getrecursionlimit() ) is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found