473,326 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

syntax error

Hi Everyone,

I am new here but I am pretty good at python programming but I am not
exert. I have been away from programming for about a year and now I am
programming in python again in combination with IDL.
I came across a error that puzzles me and I need some help. It is
pretty simple error but I suspect that the problem is not what is
python says it is.
While parsing a module my python reported a synthax error that, to me,
seemed perfectly ok:

Traceback (most recent call last):
File "/local_disk/opt/MSG_PostProc/scr/sheldon_cmsaf_remap.py", line
2, in ?
from msgpp_config import *
File "/local_disk/opt/MSG_PostProc/cfg/msgpp_config.py", line 73
from smhi_safnwc_legends import *
^
SyntaxError: invalid syntax

Now I know that there is no synthax error with that line of code. I
have also checked for indentations errors. I think that the error is
something else. Can anyone point me in the right direction? What
triggers such erroneous errors in Python?

Sincerely,
Sheldon

Jan 10 '06 #1
5 1257
Sheldon wrote:
SyntaxError: invalid syntax

Now I know that there is no synthax error with that line of code. I
have also checked for indentations errors. I think that the error is
something else. Can anyone point me in the right direction? What
triggers such erroneous errors in Python?


Being a newbie I'm still finding my way around this lot but I've
found that when this happens it's usually something on the preceeding
line that's wrong.

--
Rod
Jan 10 '06 #2
"Sheldon" wrote:
I am new here but I am pretty good at python programming but I am not
exert. I have been away from programming for about a year and now I am
programming in python again in combination with IDL.
I came across a error that puzzles me and I need some help. It is
pretty simple error but I suspect that the problem is not what is
python says it is.
While parsing a module my python reported a synthax error that, to me,
seemed perfectly ok:

Traceback (most recent call last):
File "/local_disk/opt/MSG_PostProc/scr/sheldon_cmsaf_remap.py", line 2, in ?
from msgpp_config import *
File "/local_disk/opt/MSG_PostProc/cfg/msgpp_config.py", line 73
from smhi_safnwc_legends import *
^
SyntaxError: invalid syntax

Now I know that there is no synthax error with that line of code. I
have also checked for indentations errors. I think that the error is
something else. Can anyone point me in the right direction? What
triggers such erroneous errors in Python?


Python 2.4.1 contained a bug that could result in spurious syntax errors for
relatively large files that uses PEP 263-style coding directives [1].

what Python version are you using ?

</F>

1) http://www.python.org/peps/pep-0263.html

Jan 10 '06 #3
Hi Rod,

This sounds very interesting. I am checking the previous lines and will
get back to you.

Thanks,
Sheldon

Jan 10 '06 #4
Hi Rod,

You were right. The error was on the previous line. I will remember
that.
Thanks for your help!

Sheldon

Jan 10 '06 #5
Hi Fredrik,

I am using python 2.3.3
I am checking now the previous lines for errors.

Thanks,
Sheldon

Jan 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve | last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone can explain to me why it was reported that way. ...
1
by: Donald Canton | last post by:
Hi, I'm using Bjarne's book to learn C++ and am stuck on the Calc program in Section 6. Everything works fine except when I try to use istringstream to parse a token from the command line. I...
5
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by...
2
by: david | last post by:
Anyone could give me a hand about this syntax error? Thank you. David Source Code: Dim conn As New SqlConnection(strConn) Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) 'Create a...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
1
by: Hari Sekhon | last post by:
I've written an except hook into a script as shown below which works well for the most part and catches exceptions. import sys def myexcepthook(type,value,tb): do something ...
7
by: Josh | last post by:
I have a lot of except Exception, e statements in my code, which poses some problems. One of the biggest is whenever I refactor even the triviallest thing in my code. I would like python to...
7
by: bryant | last post by:
Hi all. I am new to ASP and working in Expression Web. The following query displays the information I need in the gridview for a single record. SELECT "OE_HDR"."ORD_NO", "OE_HDR"."CUST_NAM",...
6
by: muby | last post by:
Hi everybody :) I'm modifying a C++ code in VC++ 2005 my code snippet void BandwidthAllocationScheduler::insert( Message* msg, BOOL* QueueIsFull,
5
Banfa
by: Banfa | last post by:
So I have a little problem, I have a template class and that class contains a template function; now what I want to do is declare that function in the class (or indeed the entire class) as a friend...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.