Skip to content

Cohexistance with pdbpp #67

@svalo

Description

@svalo

When pdbpp and web_pdb are installed in the same env, web_pdb is unable to run giving following traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/Code/module.py", line 1772, in backup_data_tgz
    web_pdb.set_trace()
  File "/home/user/.virtualenvs/venv/lib/python3.10/site-packages/web_pdb/__init__.py", line 256, in set_trace
    pdb = WebPdb(host, port, patch_stdstreams)
  File "/home/user/.virtualenvs/venv/lib/python3.10/site-packages/pdbpp.py", line 276, in __call__
    obj.__init__(*args, **kwargs)
TypeError: WebPdb.__init__() got an unexpected keyword argument 'start_filename'

This happens because, by default, pdbpp hijacks pdb.

Setting environment variable PDBPP_HIJACK_PDB=0 solves this issue.

As I stumbled upon this error and struggled a bit to find the remediation I'm asking if it would be possible to mention the workaround in the README.md or to deal with this in web_pdb checking if pdbpp is installed and setting the environment so to make it work.

If you are not willing to do anything I'd understand as it seems more an issue of pdbpp but then I'd just leave this issue as closed for others to find it :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions