-1

Eventually, when I am in a debug session, the current file is named "<string>". What I would expect to see is the name of the module where the debugger is currently on.

The same happens on the traceback:

Traceback (most recent call last):
  ...
  File "~/project_x/app/services/contacts.py", line 23, in find_account
  account = self._account_repo.get_by_id(id)
  File "<string>", line 2, in get_by_id
  File "~/project_x/lib/python3.7/site-packages/pony/orm/core.py", li
ne 528, in new_func
    result = func(*args, **kwargs)

1 Answers1

1

It means that the code came from something that was not a file, but a string. My guess would be an exec() call, but maybe there are other ways of getting the same effect. The previous stack frame might give some clues.

Ture Pålsson
  • 6,088
  • 2
  • 12
  • 15