Python Forum

Full Version: pydev error pydev debugger: warning: trying to add breakpoint to file that does not e
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I think ther is only a little missing in the settings.
I have a python script where I call a function which is located in a other file.
e.g
script a.py:

....
....
Test()

Script b.py:

def ExitProgr():
print ("bye bye ....!!!!")
sys.exit()

then I can't set a breakpont in script b.py.
I get the error :
Quote:pydev debugger: unable to find translation for: "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\FensterMgr.py" in ["c:\users\kurt\workspace\remotesystemstempfiles\raspberrypi\home\pi\raspiproj\teleskop.py"] (please revise your path mappings).
Pleas could someone give me a tip whats wrong. What does it mean
revise your path mappings.
Thanks a lot in advance
Kurt
Hello,
sometimes I think I'm the only one worldwide who has this problem. Think
I asked in the eclipse forum and i got this anwer:
Quote:pydev is provided by https://www.pydev.org/ so best you look there for help specifically about the Pydev tools.
Kurt
Please clarify your description of the problem, perhaps show a bit more code.
Are you importing module 1 into module 2?
This sounds more like an eclipse debugger issue, rather than a python issue.
Perhaps it's time to look at another IDE, VSCode for instance, and should you decide to try this, see: https://python-forum.io/Thread-VS-Code-f...ght=VSCode
@Larz60+,
danke für Deine Antwort.
Gerne versuche ich das Problem näher zu beschreiben.
Ich habe folgende Scripts:

Das ist das Script Teleskop.py

#!/usr/bin/python
#
# Das ist ein Test!!!
# ===================
#
import sys
sys.path.append(r'/home/pi/pysrc')
import pydevd
pydevd.settrace('192.168.180.33') # replace IP with address
from tkinter import *
from cgitb import text
from _ast import Return
#
#######################################
# Fuer Tersts
#######################################
#
# from InitPyDev import *
from FensterMgr import *
#
print ("Start")
#
# Initialiseiren fuer pydev
# =========================
#
# initpydev()

print ("Einstellfenster\n")
#
#*********************************************
# Hier rufe ich die Funktion von FensterMgr.py
# ********************************************
#
print("X = ",Printme(12))
das ist das Script FensterMgr.py

#!/usr/bin/python
from tkinter import *
from cgitb import text
from _ast import Return
from sys import *
from math import *
# **********************************
# Erstellen und Managen des Fensters
# **********************************
#
    
def Printme(grd):
    print ("Hallo... PRINT meeee")
    x=acos(pi*grd/180)
    y=asin(pi*grd/180)
    print ("X = ", x)
    print ("Y = ", y)
    return(x)
Dann habe ich die Datei pydevd_file_utils.py in den Zeilen 92 - 95 (orginal in meinem script) wie folgt modifiziert:

# example:
PATHS_FROM_ECLIPSE_TO_PYTHON = [
     (r'C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop.py',
      r'/home/pi/raspiproj/Teleskop.py')
     ]
Das Programm lief wie vorgesehen durch aber ich konnte die Breakpoints nicht ausführen. Das Programm lief durch!
Dabei bekam ich diese Meldungen angezeigt:
Quote:warning: Debugger speedups using cython not found. Run '"/usr/bin/python3" "/home/pi/pysrc/setup_cython.py" build_ext --inplace' to build.
Quote:pydev debugger: unable to find translation for: "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\FensterMgr.py" in ["c:\users\kurt\workspace\remotesystemstempfiles\raspberrypi\home\pi\raspiproj\teleskop.py"] (please revise your path mappings).
Quote:pydev debugger: warning: trying to add breakpoint to file that does not exist: C:/Users/Kurt/workspace/RemoteSystemsTempFiles/RASPBERRYPI/home/pi/raspiproj/FensterMgr.py (will have no effect)

Kann es sein, dass ich noch den Path für das Script FensterMgr.py in der Datei pydevd_file_utils.py oder sonstwo definieren muß?

Gruß

Kurt
@Larz60+,
sorry I anwered in german by mistake.
I will write the post in english now.

Thanks for your answer.
I like to try to describe the problem more in detail.
For my program I use the following scripts:
  • Teleskop.py
  • FensterMgr.py
  • pydevd_file_utils.py here I modified the lines 92-95 in the original scrip.

Teleskop.py

#!/usr/bin/python
#
# Das ist ein Test!!!
# ===================
#
import sys
sys.path.append(r'/home/pi/pysrc')
import pydevd
pydevd.settrace('192.168.180.33') # replace IP with address
from tkinter import *
from cgitb import text
from _ast import Return
#
#######################################
# Fuer Tersts
#######################################
#
# from InitPyDev import *
from FensterMgr import *
#
print ("Start")
#
# Initialiseiren fuer pydev
# =========================
#
# initpydev()
 
print ("Einstellfenster\n")
#
#*********************************************
# Hier rufe ich die Funktion von FensterMgr.py
# ********************************************
#
print("X = ",Printme(12))
FensterMgr.py

#!/usr/bin/python
from tkinter import *
from cgitb import text
from _ast import Return
from sys import *
from math import *
# **********************************
# Erstellen und Managen des Fensters
# **********************************
#
     
def Printme(grd):
    print ("Hallo... PRINT meeee")
    x=acos(pi*grd/180)
    y=asin(pi*grd/180)
    print ("X = ", x)
    print ("Y = ", y)
    return(x)
pydevd_file_utils.py

# example:
PATHS_FROM_ECLIPSE_TO_PYTHON = [
     (r'C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop.py',
      r'/home/pi/raspiproj/Teleskop.py')
     ]
The program works as planned, but I cannot set a breakpoint.
But when I debug the programm I get three messages:

1.
Quote:warning: Debugger speedups using cython not found. Run '"/usr/bin/python3" "/home/pi/pysrc/setup_cython.py" build_ext --inplace' to build.
2.
Quote:pydev debugger: unable to find translation for: "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\FensterMgr.py" in ["c:\users\kurt\workspace\remotesystemstempfiles\raspberrypi\home\pi\raspiproj\teleskop.py"] (please revise your path mappings).
3.
Quote:pydev debugger: warning: trying to add breakpoint to file that does not exist: C:/Users/Kurt/workspace/RemoteSystemsTempFiles/RASPBERRYPI/home/pi/raspiproj/FensterMgr.py (will have no effect)

Do you think I have to setup the path for the script FensterMgr.py in the file pydevd_file_utils.py
or somewhere else?
I would be glad if you or somebody else can help me!


With kind regards
Kurt
If on Linux, you can set a symbolic link.
ln -s path/original.py local.py
Or perhaps specify the path using pathlib.
I know that you can also use relative paths in the import name.
I'm not an expert on this subject, but symbolic links work for me.
Hi,
my Host where eclipse runs is a Windows PC and the Script runs on a raspberry.
Wehre should I set the link?
On the host or on raspberry?
@Larz60+,
thank you very much for your tip. I created the symbolic link exactly as you suggested.
I wrote on my raspberry:
Quote:ln -s path/original.py local.py

Think Ist this correct or is this just an example Think ?
But it still doesn't catch the breakpoint.
I execited the script typing python3 Teleskop.py
I really have no ideas anymore. Confused
Has anybody an idea?
Thanks in advance.
Kurt
Hello,
I'm trying to solve my problem by setting a symbolic link in the way as suggested by @Larz60+ :
Quote:ln -s /home/pi/raspiproj/Teleskop/FensterMgr.py "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop\FensterMgr.py"
It creates a link.
Quote: C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop\FensterMgr.py -> /home/pi/raspiproj/Teleskop/FensterMgr.py
Every seems to be ok, but the pydev debugger is not able to add the breakpoints.
I'm not an expert in linux and I do not know whats wrong. Huh
Think What is the exact syntax for setting such type of link. Think

I was working on this and I found out that pydev is able to debug one script only. But if you use a program which calls functions located in other scripts it doesn't get the breakpoints there.
You have to setup the file /pydevd_file_utils.py again for this script if you wont to debug the function.


It's a little stupid but you have to live with that! Or is there an other way?

Thanks a lot for any tips
Kurt