Skip to content

ZXBasic fails to run as a console script #313

@kosarev

Description

@kosarev

The problem seems to be that the zxb.py in the root directory effectively imports itself on import zxb. Looks like either the script or the same-named package needs to be renamed? Or, you could just remove the script and let the package do its work.

To reproduce:

$ python3 setup.py develop --prefix ~/.local
$ zxb
Traceback (most recent call last):
  File "/home/kosarev/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2451, in resolve
    return functools.reduce(getattr, self.attrs, module)
AttributeError: module 'zxb' has no attribute 'main'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kosarev/.local/bin/zxb", line 11, in <module>
    load_entry_point('zxbasic', 'console_scripts', 'zxb')()
  File "/home/kosarev/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/kosarev/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/home/kosarev/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/home/kosarev/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2453, in resolve
    raise ImportError(str(exc))
ImportError: module 'zxb' has no attribute 'main'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions