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

Source Code Strings Empty #125

Open
jdeinum opened this issue Oct 17, 2024 · 0 comments
Open

Source Code Strings Empty #125

jdeinum opened this issue Oct 17, 2024 · 0 comments

Comments

@jdeinum
Copy link

jdeinum commented Oct 17, 2024

Description

When using the following example after installation:

import hunter
hunter.trace(module='posixpath', action=hunter.CallPrinter)

import os
os.path.join('a', 'b')

I get the following output:

  <frozen posixpath>:71    call      => join(a='a', *p=('b',))
  <frozen posixpath>:76    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:77    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:41    call         => _get_sep(path='a')
  <frozen posixpath>:42    line            ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:45    line            ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:45    return       <= _get_sep: '/'
  <frozen posixpath>:78    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:79    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:80    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:82    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:83    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:85    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:88    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:82    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:92    line         ??? NO SOURCE: Source code string for '<frozen posixpath>' is empty.
  <frozen posixpath>:92    return    <= join: 'a/b'

Additional Info

Related to #112, but since this doesn't involve importlib, I think it may be a different issue. If it's the same issue then I can close this and add it as a comment on that issue :)

Python Version: Python 3.12.7
Linux Version: 6.11.3-arch1-1
Hunter Version for Both: 3.7.0

I tried with both the pip version inside a venv, as well as installing thepython-hunter-3.7.0-1 from the arch repositories. Both give me the same output.

Steps to Reproduce

Method 1 - Arch

  1. Run pacman -S extra-testing/python-hunter
  2. Create a main.py file with the code above
  3. Run python3 main.py

Method 2 - Sandbox

  1. Run python3 -m venv sandbox
  2. Run source sandbox/bin/activate
  3. Run pip install hunter
  4. Create a main.py file with the code above
  5. Run python3 main.py
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