Syntax error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hg

    #1

    Syntax error

    Hi,

    I've had this problem in the past and still cannot fully understand.

    I latelly passed my source code in Wing IDE wihch asked be to resolve
    tab/space/CRLF conflicts and I said yes (initially the code was developped
    under Linux ... and now all source got tabs replaced by spaces and all EOL
    when switched to Windows CR/LF)

    I sent a new release of the software, tested here first, to the customer who
    got a syntax error on a line which visibly did not have any error.

    retyping that line by and made the error jump around the file like crazy.

    I had the customer comment out the first two lines of the file:

    """
    #!/bin/env python
    # -*- coding: iso-8859-15 -*-
    """

    .... and the problem disappeared.

    I am at a loss.

    Any clue ?

    Thanks

    hg
  • Marc 'BlackJack' Rintsch

    #2
    Re: Syntax error

    In <9w5Vh.8580$OT4 .3503@newsfe19. lga>, hg wrote:
    I had the customer comment out the first two lines of the file:
    >
    """
    #!/bin/env python
    # -*- coding: iso-8859-15 -*-
    """
    >
    ... and the problem disappeared.
    >
    I am at a loss.
    >
    Any clue ?
    There was once a bug in Python that lead to such "errors" if an encoding
    comment was used. So your costumer might check his Python version and
    maybe he should update.

    Ciao,
    Marc 'BlackJack' Rintsch

    Comment

    • Diez B. Roggisch

      #3
      Re: Syntax error

      hg wrote:
      Hi,
      >
      I've had this problem in the past and still cannot fully understand.
      >
      I latelly passed my source code in Wing IDE wihch asked be to resolve
      tab/space/CRLF conflicts and I said yes (initially the code was developped
      under Linux ... and now all source got tabs replaced by spaces and all EOL
      when switched to Windows CR/LF)
      >
      I sent a new release of the software, tested here first, to the customer
      who got a syntax error on a line which visibly did not have any error.
      >
      retyping that line by and made the error jump around the file like crazy.
      >
      I had the customer comment out the first two lines of the file:
      >
      """
      #!/bin/env python
      # -*- coding: iso-8859-15 -*-
      """
      >
      ... and the problem disappeared.
      >
      I am at a loss.
      >
      Any clue ?
      Without a stacktrace? It's spring, not crystal ball season.

      Diez

      Comment

      • hg

        #4
        Re: Syntax error

        Marc 'BlackJack' Rintsch wrote:
        In <9w5Vh.8580$OT4 .3503@newsfe19. lga>, hg wrote:
        >
        >I had the customer comment out the first two lines of the file:
        >>
        >"""
        >#!/bin/env python
        ># -*- coding: iso-8859-15 -*-
        >"""
        >>
        >... and the problem disappeared.
        >>
        >I am at a loss.
        >>
        >Any clue ?
        >
        There was once a bug in Python that lead to such "errors" if an encoding
        comment was used. So your costumer might check his Python version and
        maybe he should update.
        >
        Ciao,
        Marc 'BlackJack' Rintsch
        Thanks,

        The troubling part is that I package python in the release ... but I'll
        check anyway.

        hg

        Comment

        • hg

          #5
          Re: Syntax error

          Diez B. Roggisch wrote:
          hg wrote:
          >
          >Hi,
          >>
          >I've had this problem in the past and still cannot fully understand.
          >>
          >I latelly passed my source code in Wing IDE wihch asked be to resolve
          >tab/space/CRLF conflicts and I said yes (initially the code was
          >developped under Linux ... and now all source got tabs replaced by spaces
          >and all EOL when switched to Windows CR/LF)
          >>
          >I sent a new release of the software, tested here first, to the customer
          >who got a syntax error on a line which visibly did not have any error.
          >>
          >retyping that line by and made the error jump around the file like crazy.
          >>
          >I had the customer comment out the first two lines of the file:
          >>
          >"""
          >#!/bin/env python
          ># -*- coding: iso-8859-15 -*-
          >"""
          >>
          >... and the problem disappeared.
          >>
          >I am at a loss.
          >>
          >Any clue ?
          >
          Without a stacktrace? It's spring, not crystal ball season.
          >
          Diez

          Not worth showing really, it's a screen dump so can't put it here but:

          .....
          self.T_CARD_FOU ND = 'PLEASE WAIT ...'
          ^
          Syntax error

          hg





          Comment

          Working...