TITAN2D / titan2d

The TITAN2D toolkit is used for modeling of geophysical mass flows over natural terrain (volcanic flows, avalanches, landslides, ...).
https://vhub.org/resources/titan2d
Other
23 stars 15 forks source link

Inconsistent use of tabs and space in indentation on line 47 #5

Closed kelingkece closed 4 years ago

kelingkece commented 4 years ago

I download the Titan2D 4.0 version, suddenly when I try to run the interface using titan_gui.py it gave me error of "inconsistent use of tabs and spaces in indentation on line 47" here is some code of the titan_gui.py

#!/usr/bin/env python
#*******************************************************************
#* Copyright (C) 2003 University at Buffalo
#*
#* This software can be redistributed free of charge.  See COPYING
#* file in the top distribution directory for more details.
#*
#* This software is distributed in the hope that it will be useful,
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#*
#* Author: 
#* Description: this is an executable python script
#*
#*******************************************************************
#* $Id: titan_gui.py 235 2012-03-29 07:04:35Z dkumar $ 
#*

import sys,os,math,string,re,socket

import Tkinter
from Tkinter import *
import SimpleDialog,tkMessageBox
import tkFileDialog

class FinalInstructions:
    def __init__(self,master,instruction_string):
        Label(master, text=instruction_string).grid(row=0,column=0,sticky=W,columnspan=3)
        Button(master, text="Quit", command=master.quit).grid(row=3,column=1)

class QuestionTemplate5:
    def __init__(self,master,src_number,filename,directory,heightscale):
        Label(master, text="Information for Flux Source Number "+str(src_number+1)).grid(row=0,column=0,sticky=W,columnspan=2)
        Label(master, text="Extrusion flux rate [m/s]:").grid(row=1,column=0,sticky=W)
        Label(master, text="Active Time [s], start, end:").grid(row=2,column=0,sticky=W)
        Label(master, text="Center of the source, xc, yc (UTM E, UTM N):").grid(row=3,column=0,sticky=W)
        Label(master, text="Major and Minor Extent, majorR, minorR (m, m):").grid(row=4,column=0,sticky=W)        
        Label(master, text="Orientation (angle [degrees] from X axis to major axis):").grid(row=5,column=0,sticky=W)
        Label(master, text="Initial speed [m/s]:").grid(row=6,column=0,sticky=W)
        Label(master, text="Initial direction ([degrees] from X axis):").grid(row=7,column=0,sticky=W)

        self.influx = Entry(master)
        self.start_time = Entry(master)
        self.end_time   = Entry(master)
        self.xcenter = Entry(master)
    self.ycenter = Entry(master) // the error is on this line
        self.majradius = Entry(master)
        self.minradius = Entry(master)
        self.orientation = Entry(master)
        self.Vmagnitude = Entry(master)
        self.Vdirection = Entry(master)
kelingkece commented 4 years ago

Update, now the error on line 871, invalid syntax titan_gui.zip

rljbufny1 commented 4 years ago

Hello,

Previous versions of Titan2D installed the python script, titan_gui.py, to the Titan2D bin directory and users were able to enter the command <python titan_gui.py &> in the Titan2D bin directory to run Titan2D via the python script. Currently, this python script, titan2d_gui.py, in the Titan2D /scripts directory has not been updated for titan2d 4.0.0 and a Java GUI is installed.

kelingkece commented 4 years ago

Hello,

Previous versions of Titan2D installed the python script, titan_gui.py, to the Titan2D bin directory and users were able to enter the command <python titan_gui.py &> in the Titan2D bin directory to run Titan2D via the python script. Currently, this python script, titan2d_gui.py, in the Titan2D /scripts directory has not been updated for titan2d 4.0.0 and a Java GUI is installed.

So I can run the GUI via java? I didn't have to run terminal and python_gui ?

rljbufny1 commented 4 years ago

I am assuming that you have worked with a previous version of Titan2D.

Have you installed Titan2D 4.0.0? What operating system are you using?

I have attached the Titan2D_User_Guide.pdf which I downloaded from https://vhub.org/resources/titan2d/supportingdocs.

It contains instructions for installing and running Titan2D 4.0.0 using either a python input file or via the Java GUI.

As an alternative, Titan2D can also be run from the url: https://vhub.org/tools/titan2d. In this case, click the Launch Tool button to open the Java GUI. You will need to be a vhub member for this but it is easy to become a member.

On Thu, Aug 13, 2020 at 2:22 PM Reza Aulia notifications@github.com wrote:

Hello,

Previous versions of Titan2D installed the python script, titan_gui.py, to the Titan2D bin directory and users were able to enter the command <python titan_gui.py &> in the Titan2D bin directory to run Titan2D via the python script. Currently, this python script, titan2d_gui.py, in the Titan2D /scripts directory has not been updated for titan2d 4.0.0 and a Java GUI is installed.

So I can run the GUI via java? I didn't have to run terminal and python_gui ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TITAN2D/titan2d/issues/5#issuecomment-673636764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP5S7U3YNLOXFD6W5ZIJHTSAQVOZANCNFSM4P6QKL6A .

kelingkece commented 4 years ago

No, I haven't work with Titan2D before, and I use Linux OS, since u gave me the link guide and it can run with java GUI, I'll try to run it eith Java instead using Python installation, thanks for the answer