Problem trying to append data.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 2inshix
    New Member
    • May 2010
    • 11

    Problem trying to append data.

    Hello, I'm new to this website. I want to thank everyone here for the wonderful
    help you are providing to the community.
    I stated teaching myself programming in python only a few weeks back and
    I'm trying to add new features to a japanese verb conjugator (a program a friend wrote for me)
    . I succeeded in making a few improvements to the original code but I seem to be stucked trying to append a particular list. I'd really appreciate if someone would lend a helping hand here.
    It shouldn't take more than a couple of minutes for an experienced python programmer to fugure out what I'm doing wrong.

    Cheers
    Attached Files
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Unfortunately, your code is missing some assignments and will not run. I cannot tell what the problem is nor can I determine what the code does. For example, "verbList" and "exceptions " are not defined. If you could post some code that works except for the error, I will try to help.

    Comment

    • 2inshix
      New Member
      • May 2010
      • 11

      #3
      Originally posted by bvdet
      Unfortunately, your code is missing some assignments and will not run. I cannot tell what the problem is nor can I determine what the code does. For example, "verbList" and "exceptions " are not defined. If you could post some code that works except for the error, I will try to help.
      Hello, bvdet,
      Thank you for your quick support.
      I haven't figured out how to attach a new file in order to be able to upload a more complete file.
      But I you'd be kind enough to go ahead and add the next three lines to the code, the code should run.
      Thank you so very much for all your help.
      Cheers

      exceptions = ["asuru"]
      verbList = ""
      replace: verbfile = ["nomu","toru"," naru"]

      Comment

      • bvdet
        Recognized Expert Specialist
        • Oct 2006
        • 2851

        #4
        2inshix,

        The script fails with this error:
        "if mytype == vruends or mytype == eruends or mytype == buends......
        NameError: global name 'eruends' is not defined"

        There are undefined variables in function whattype().

        A suggestion - instead of
        Code:
        if mytype == vruends or mytype == eruends or mytype == buends.....
        test for membership with the in operator:
        Code:
        if mytype in [vruends, eruends, buends,.......]

        Comment

        • 2inshix
          New Member
          • May 2010
          • 11

          #5
          Originally posted by bvdet
          2inshix,

          The script fails with this error:
          "if mytype == vruends or mytype == eruends or mytype == buends......
          NameError: global name 'eruends' is not defined"

          There are undefined variables in function whattype().

          A suggestion - instead of
          Code:
          if mytype == vruends or mytype == eruends or mytype == buends.....
          test for membership with the in operator:
          Code:
          if mytype in [vruends, eruends, buends,.......]
          Hello, bvdet,
          Thank you for all your help. Sorry about the failing error.
          A experimented and tried as many thing as I could come up with and
          eventually I was able sole the problem.
          The problem was mostly an issue with indentation.
          Now, I'm ready to start working on the next phase of the program.

          Thank so much for all your support.
          This will be the first place I go for help next time I get stucked!
          Cheers everyone

          Comment

          Working...