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

AttributeError: 'NativeFunction' object has no attribute '__name__' #23

Open
SuperMaZingCoder opened this issue Jan 23, 2021 · 0 comments

Comments

@SuperMaZingCoder
Copy link

I've run into an error trying to enter the Gurklang REPL.

Steps to reproduce:

  1. Install following download instructions.
  2. Enter REPL with env/bin/python -m gurklang

Trace:

❯ python3 -m gurklang
Traceback (most recent call last):
  File "/Users/super/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/super/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/super/Downloads/py-gurklang-master/gurklang/__main__.py", line 2, in <module>
    from . import repl, vm, parser
  File "/Users/super/Downloads/py-gurklang-master/gurklang/repl.py", line 8, in <module>
    from . import vm
  File "/Users/super/Downloads/py-gurklang-master/gurklang/vm.py", line 5, in <module>
    from . import prelude
  File "/Users/super/Downloads/py-gurklang-master/gurklang/prelude.py", line 7, in <module>
    from . import stdlib_modules
  File "/Users/super/Downloads/py-gurklang-master/gurklang/stdlib_modules/__init__.py", line 7, in <module>
    from . import math, inspect, coro, repl_utils, boxes, threading_, strings, recursion, ds_pure, ds, streams
  File "/Users/super/Downloads/py-gurklang-master/gurklang/stdlib_modules/strings.py", line 50, in <module>
    _register_delegated_methods()
  File "/Users/super/Downloads/py-gurklang-master/gurklang/stdlib_modules/strings.py", line 47, in _register_delegated_methods
    module.register_simple(name)(fun)
  File "/Users/super/Downloads/py-gurklang-master/gurklang/builtin_utils.py", line 42, in inner
    native_fn = make_simple(name)(fn)  # type: ignore
  File "/Users/super/Downloads/py-gurklang-master/gurklang/builtin_utils.py", line 100, in inner
    new_fn.__name__ = fn.__name__
AttributeError: 'NativeFunction' object has no attribute '__name__'

OS: macOS Catalina 10.15.7
Python Version: 3.9.0

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