ImportError: No module named 'ROS_support'?

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Antworten
Kiwi_gamer01
User
Beiträge: 5
Registriert: Freitag 2. November 2018, 21:55

Dienstag 21. Mai 2019, 15:59

Ich nutze das Programm page zum Erstellen eines GUI. Dennoch habe ich das Problem beim Ausführen des Programms kommt als Fehler:

Code: Alles auswählen

pi@raspberrypi:~/Downloads/page $ python3 ROS.py
Traceback (most recent call last):
  File "ROS.py", line 22, in <module>
    import ROS_support
ImportError: No module named 'ROS_support'
Mir ist bewusst das das Modul anders heißen muss, dennoch kann ich dazu nichts finden.

Hier der Ganze Code:

Code: Alles auswählen

#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 4.23
#  in conjunction with Tcl version 8.6
#    May 18, 2019 11:43:30 PM CEST  platform: Linux

import sys

try:
    import Tkinter as tk
except ImportError:
    import tkinter as tk

try:
    import ttk
    py3 = False
except ImportError:
    import tkinter.ttk as ttk
    py3 = True

import ROS_support

def vp_start_gui():
    global val, w, root
    root = tk.Tk()
    top = Roboter_Operaiting_Station (root)
    ROS_support.init(root, top)
    root.mainloop()

w = None
def create_Roboter_Operaiting_Station(root, *args, **kwargs):
    '''Starting point when module is imported by another program.'''
    global w, w_win, rt
    rt = root
    w = tk.Toplevel (root)
    top = Roboter_Operaiting_Station (w)
    ROS_support.init(w, top, *args, **kwargs)
    return (w, top)

def destroy_Roboter_Operaiting_Station():
    global w
    w.destroy()
    w = None

class Roboter_Operaiting_Station:
    def __init__(self, top=None):
        '''This class configures and populates the toplevel window.
           top is the toplevel containing window.'''
        _bgcolor = '#d9d9d9'  # X11 color: 'gray85'
        _fgcolor = '#000000'  # X11 color: 'black'
        _compcolor = '#d9d9d9' # X11 color: 'gray85'
        _ana1color = '#d9d9d9' # X11 color: 'gray85'
        _ana2color = '#ececec' # Closest X11 color: 'gray92'
        font14 = "-family {Liberation Sans Narrow} -size 11 -weight "  \
            "normal -slant roman -underline 0 -overstrike 0"
        font16 = "-family {Liberation Mono} -size 17 -weight normal "  \
            "-slant roman -underline 0 -overstrike 0"
        font18 = "-family {Liberation Sans Narrow} -size 10 -weight "  \
            "normal -slant roman -underline 0 -overstrike 0"
        font21 = "-family {Liberation Sans Narrow} -size 30 -weight "  \
            "normal -slant roman -underline 0 -overstrike 0"
        font9 = "-family {Liberation Mono} -size 12 -weight bold "  \
            "-slant roman -underline 0 -overstrike 0"

        top.geometry("960x366+535+261")
        top.title("ROS Roboter Operating Station")
        top.configure(highlightcolor="black")

        self.Labelframe1 = tk.LabelFrame(top)
        self.Labelframe1.place(relx=0.333, rely=0.082, relheight=0.423
                , relwidth=0.313)
        self.Labelframe1.configure(relief='groove')
        self.Labelframe1.configure(font=font9)
        self.Labelframe1.configure(text='''Anzeige''')

        self.Text1 = tk.Text(self.Labelframe1)
        self.Text1.place(relx=0.067, rely=0.516, relheight=0.335, relwidth=0.853
                , bordermode='ignore')
        self.Text1.configure(background="white")
        self.Text1.configure(font=font16)
        self.Text1.configure(selectbackground="#c4c4c4")
        self.Text1.configure(undo="1")
        self.Text1.configure(width=256)
        self.Text1.configure(wrap="word")
        self.Text1.bind('<Button-1>',lambda e:ROS_support.SiebenSegmentAusgabe(e))

        self.Labelframe2 = tk.LabelFrame(top)
        self.Labelframe2.place(relx=0.01, rely=0.519, relheight=0.451
                , relwidth=0.313)
        self.Labelframe2.configure(relief='groove')
        self.Labelframe2.configure(text='''Eingabe / Scrolling''')
        self.Labelframe2.configure(width=300)

        self.Entry1 = tk.Entry(self.Labelframe2)
        self.Entry1.place(relx=0.1, rely=0.727, height=30, relwidth=0.487
                , bordermode='ignore')
        self.Entry1.configure(background="white")
        self.Entry1.configure(font="TkFixedFont")
        self.Entry1.configure(selectbackground="#c4c4c4")
        self.Entry1.bind('<Enter>',lambda e:ROS_support.ScrollingEntry(e))

        self.Button1 = tk.Button(self.Labelframe2)
        self.Button1.place(relx=0.633, rely=0.727, height=28, width=91
                , bordermode='ignore')
        self.Button1.configure(activebackground="#f9f9f9")
        self.Button1.configure(text='''Absenden''')
        self.Button1.bind('<Button-1>',lambda e:ROS_support.ScrollingButton(e))

        self.Label1 = tk.Label(self.Labelframe2)
        self.Label1.place(relx=0.067, rely=0.242, height=18, width=193
                , bordermode='ignore')
        self.Label1.configure(activebackground="#f9f9f9")
        self.Label1.configure(font=font14)
        self.Label1.configure(justify='right')
        self.Label1.configure(text='''Text bitte in das Textfeld eingeben''')

        self.Label2 = tk.Label(self.Labelframe2)
        self.Label2.place(relx=0.067, rely=0.424, height=21, width=261
                , bordermode='ignore')
        self.Label2.configure(activebackground="#f9f9f9")
        self.Label2.configure(font=font14)
        self.Label2.configure(text='''Dieser Text wird dan über die Anzeige Scrollen''')

        self.Labelframe2 = tk.LabelFrame(top)
        self.Labelframe2.place(relx=0.333, rely=0.519, relheight=0.451
                , relwidth=0.313)
        self.Labelframe2.configure(relief='groove')
        self.Labelframe2.configure(text='''Eingabe / Blinken''')
        self.Labelframe2.configure(width=300)

        self.Label1_1 = tk.Label(self.Labelframe2)
        self.Label1_1.place(relx=0.067, rely=0.242, height=18, width=193
                , bordermode='ignore')
        self.Label1_1.configure(activebackground="#f9f9f9")
        self.Label1_1.configure(font=font14)
        self.Label1_1.configure(justify='right')
        self.Label1_1.configure(text='''Text bitte in das Textfeld eingeben''')

        self.Label2_2 = tk.Label(self.Labelframe2)
        self.Label2_2.place(relx=0.067, rely=0.424, height=21, width=131
                , bordermode='ignore')
        self.Label2_2.configure(activebackground="#f9f9f9")
        self.Label2_2.configure(font=font14)
        self.Label2_2.configure(text='''Dieser Text wird dann''')
        self.Label2_2.configure(width=131)

        self.Entry1 = tk.Entry(self.Labelframe2)
        self.Entry1.place(relx=0.5, rely=0.424, height=20, relwidth=0.087
                , bordermode='ignore')
        self.Entry1.configure(background="white")
        self.Entry1.configure(font="TkFixedFont")
        self.Entry1.configure(width=26)
        self.Entry1.bind('<Enter>',lambda e:ROS_support.BlinkanzahlEntry(e))

        self.Label1 = tk.Label(self.Labelframe2)
        self.Label1.place(relx=0.6, rely=0.424, height=18, width=95
                , bordermode='ignore')
        self.Label1.configure(text='''mal aufblinken''')

        self.Entry1_3 = tk.Entry(self.Labelframe2)
        self.Entry1_3.place(relx=0.067, rely=0.727, height=30, relwidth=0.487
                , bordermode='ignore')
        self.Entry1_3.configure(background="white")
        self.Entry1_3.configure(font="TkFixedFont")
        self.Entry1_3.configure(selectbackground="#c4c4c4")
        self.Entry1_3.bind('<Button-1>',lambda e:ROS_support.BlinkenEntry(e))

        self.Button1_4 = tk.Button(self.Labelframe2)
        self.Button1_4.place(relx=0.6, rely=0.727, height=28, width=91
                , bordermode='ignore')
        self.Button1_4.configure(activebackground="#f9f9f9")
        self.Button1_4.configure(text='''Absenden''')
        self.Button1_4.bind('<Button-1>',lambda e:ROS_support.BlinkenButton(e))

        self.Label2 = tk.Label(self.Labelframe2)
        self.Label2.place(relx=0.1, rely=0.606, height=19, width=111
                , bordermode='ignore')
        self.Label2.configure(disabledforeground="#a30000")
        self.Label2.configure(font=font18)
        self.Label2.configure(foreground="#a30000")
        self.Label2.configure(highlightcolor="#a30000")
        self.Label2.configure(text='''Maximal 8 Buchstaben''')

        self.Labelframe3 = tk.LabelFrame(top)
        self.Labelframe3.place(relx=0.656, rely=0.519, relheight=0.451
                , relwidth=0.333)
        self.Labelframe3.configure(relief='groove')
        self.Labelframe3.configure(text='''Eingabe / Anzeigen''')
        self.Labelframe3.configure(width=320)

        self.Label1_2 = tk.Label(self.Labelframe3)
        self.Label1_2.place(relx=0.063, rely=0.242, height=18, width=193
                , bordermode='ignore')
        self.Label1_2.configure(activebackground="#f9f9f9")
        self.Label1_2.configure(font=font14)
        self.Label1_2.configure(justify='right')
        self.Label1_2.configure(text='''Text bitte in das Textfeld eingeben''')

        self.Label2_3 = tk.Label(self.Labelframe3)
        self.Label2_3.place(relx=0.063, rely=0.424, height=21, width=131
                , bordermode='ignore')
        self.Label2_3.configure(activebackground="#f9f9f9")
        self.Label2_3.configure(font=font14)
        self.Label2_3.configure(text='''Dieser Text wird dann''')

        self.Entry1_4 = tk.Entry(self.Labelframe3)
        self.Entry1_4.place(relx=0.469, rely=0.424, height=20, relwidth=0.081
                , bordermode='ignore')
        self.Entry1_4.configure(background="white")
        self.Entry1_4.configure(font="TkFixedFont")
        self.Entry1_4.configure(selectbackground="#c4c4c4")
        self.Entry1_4.bind('<Enter>',lambda e:ROS_support.SekundenEingabeEntry(e))

        self.Label1_5 = tk.Label(self.Labelframe3)
        self.Label1_5.place(relx=0.563, rely=0.424, height=18, width=125
                , bordermode='ignore')
        self.Label1_5.configure(activebackground="#f9f9f9")
        self.Label1_5.configure(font=font14)
        self.Label1_5.configure(text='''Sekunden angezeit''')
        self.Label1_5.configure(width=125)

        self.Entry1_4 = tk.Entry(self.Labelframe3)
        self.Entry1_4.place(relx=0.094, rely=0.727, height=30, relwidth=0.456
                , bordermode='ignore')
        self.Entry1_4.configure(background="white")
        self.Entry1_4.configure(font="TkFixedFont")
        self.Entry1_4.configure(selectbackground="#c4c4c4")
        self.Entry1_4.bind('<Button-1>',lambda e:ROS_support.AnzeigenEntry(e))

        self.Button1_5 = tk.Button(self.Labelframe3)
        self.Button1_5.place(relx=0.594, rely=0.727, height=28, width=91
                , bordermode='ignore')
        self.Button1_5.configure(activebackground="#f9f9f9")
        self.Button1_5.configure(text='''Absenden''')
        self.Button1_5.bind('<Button-1>',lambda e:ROS_support.AnzeigenButton(e))

        self.Label2_6 = tk.Label(self.Labelframe3)
        self.Label2_6.place(relx=0.125, rely=0.606, height=19, width=111
                , bordermode='ignore')
        self.Label2_6.configure(activebackground="#f9f9f9")
        self.Label2_6.configure(disabledforeground="#a30000")
        self.Label2_6.configure(font=font18)
        self.Label2_6.configure(foreground="#a30000")
        self.Label2_6.configure(highlightcolor="#a30000")
        self.Label2_6.configure(text='''Maximal 8 Buchstaben''')

        self.Labelframe4 = tk.LabelFrame(top)
        self.Labelframe4.place(relx=0.906, rely=0.191, relheight=0.314
                , relwidth=0.083)
        self.Labelframe4.configure(relief='groove')
        self.Labelframe4.configure(text='''Datum''')
        self.Labelframe4.configure(width=80)

        self.Button1 = tk.Button(self.Labelframe4)
        self.Button1.place(relx=0.125, rely=0.696, height=28, width=60
                , bordermode='ignore')
        self.Button1.configure(text='''OFF''')
        self.Button1.configure(width=60)
        self.Button1.bind('<Button-1>',lambda e:ROS_support.DatumOFFButton(e))

        self.Button1_7 = tk.Button(self.Labelframe4)
        self.Button1_7.place(relx=0.125, rely=0.435, height=28, width=60
                , bordermode='ignore')
        self.Button1_7.configure(activebackground="#f9f9f9")
        self.Button1_7.configure(text='''On''')
        self.Button1_7.bind('<Button-1>',lambda e:ROS_support.DatumONButton(e))

        self.Labelframe5 = tk.LabelFrame(top)
        self.Labelframe5.place(relx=0.813, rely=0.191, relheight=0.314
                , relwidth=0.083)
        self.Labelframe5.configure(relief='groove')
        self.Labelframe5.configure(text='''Uhrzeit''')
        self.Labelframe5.configure(width=80)

        self.Button1_8 = tk.Button(self.Labelframe5)
        self.Button1_8.place(relx=0.125, rely=0.435, height=28, width=60
                , bordermode='ignore')
        self.Button1_8.configure(activebackground="#f9f9f9")
        self.Button1_8.configure(text='''ON''')
        self.Button1_8.bind('<Button-1>',lambda e:ROS_support.UhrzeitONButton(e))

        self.Button1_9 = tk.Button(self.Labelframe5)
        self.Button1_9.place(relx=0.125, rely=0.696, height=28, width=60
                , bordermode='ignore')
        self.Button1_9.configure(activebackground="#f9f9f9")
        self.Button1_9.configure(text='''OFF''')
        self.Button1_9.bind('<Button-1>',lambda e:ROS_support.UhrzeitOFFButton(e))

        self.Button2 = tk.Button(top)
        self.Button2.place(relx=0.01, rely=0.301, height=58, width=110)
        self.Button2.configure(font=font21)
        self.Button2.configure(text='''Clear''')
        self.Button2.configure(width=110)
        self.Button2.bind('<Button-1>',lambda e:ROS_support.ClearButton(e))

if __name__ == '__main__':
    vp_start_gui()

__deets__
User
Beiträge: 5518
Registriert: Mittwoch 14. Oktober 2015, 14:29

Dienstag 21. Mai 2019, 18:15

Was heißt das Modul muss anders heißen? Woher weißt du das? Und wenn du das weißt, warum weißt du dann nicht, WIE es heißen soll.?
Antworten