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

pdoc3 crashes after package 'pdoc' is uninstalled #131

Open
rodanrider opened this issue Nov 28, 2019 · 0 comments
Open

pdoc3 crashes after package 'pdoc' is uninstalled #131

rodanrider opened this issue Nov 28, 2019 · 0 comments
Labels
bug Something isn't working upstream Issue affects a dependency of ours

Comments

@rodanrider
Copy link

This issue is probably the same as #30 which was closed "invalid". Here are steps to reproduce.

It looks like an interaction (name collision) between "pdoc" and "pdoc3" packages. Both packages appear to create this file upon install and remove it upon uninstall:

Lib/site-packages/pdoc/__init__.py

Expected Behavior

> pdoc3 --version
pdoc3 0.7.2

Actual Behavior

> pdoc3 --version
Traceback (most recent call last):
  File "C:\Python36-32\Scripts\pdoc3-script.py", line 11, in <module>
    load_entry_point('pdoc3==0.7.2', 'console_scripts', 'pdoc3')()
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2318, in load
    return self.resolve()
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\python36-32\lib\site-packages\pdoc\cli.py", line 27, in <module>
    '--version', action='version', version='%(prog)s ' + pdoc.__version__)
AttributeError: module 'pdoc' has no attribute '__version__'

Steps to Reproduce

  1. Clean slate
> pip3 uninstall pdoc pdoc3 markdown
  1. Install pdoc3 to observe normal behaviour
> pip3 install pdoc3
  1. Observe normal behaviour
> pdoc3 --version
pdoc3 0.7.2
  1. SOURCE OF ISSUE - Install pdoc and then uninstall (which downgrades markdown, so we need to re-upgrade that):
> pip3 install pdoc
> pip3 uninstall pdoc
> pip3 install --upgrade markdown
  1. Observe crash:
> pdoc3 --version
Traceback (most recent call last):
  File "C:\Python36-32\Scripts\pdoc3-script.py", line 11, in <module>
    load_entry_point('pdoc3==0.7.2', 'console_scripts', 'pdoc3')()
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2318, in load
    return self.resolve()
  File "c:\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\python36-32\lib\site-packages\pdoc\cli.py", line 27, in <module>
    '--version', action='version', version='%(prog)s ' + pdoc.__version__)
AttributeError: module 'pdoc' has no attribute '__version__'

Workaround

Uninstall pdoc and pdoc3 and re-install pdoc3.

> pip3 uninstall pdoc pdoc3
> pip3 install pdoc3

Additional info

  • pdoc3 version: 0.7.2
  • Python 3.7.4
  • Windows 10 command line
@kernc kernc added the bug Something isn't working label Nov 29, 2019
@kernc kernc changed the title pdoc3 --version crashes for version 0.7.2 pdoc3 crashes after package 'pdoc' is uninstalled Dec 8, 2019
@kernc kernc added the upstream Issue affects a dependency of ours label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue affects a dependency of ours
Development

No branches or pull requests

2 participants