Lexical Error At Line
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow lexical error at line encountered eof after Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow encountered \n 10 after is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Lexical error: Encountered: “” lexical error in java (0), after : “” up vote 3 down vote favorite I needed to start dealing with foreign characters, and in doing so, I think I royally screwed up a file's encoding. The error I'm getting is: Lexical error at line 1, column 8. Encountered: css validator "" (0), after : "" The first line of the file is: import xml.etree.cElementTree as ET Also of note: when I pasted the line above into the textarea to ask this question, and submitted, an unknown character appeared between every character (e I have been unable to fix this issue by adding an explicit coding definition: # -*- coding: utf-8 -*- I have also been unable to revert the file (using Hg) to a previous version, nor copy/paste code into a new file, or replace the broken file with copied/pasted code. Please help! python lexical share|improve this question asked Jun 28 '11 at 3:05 Jonathan Drake 17019 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted If it is indeed a zero character in there, you may find you've injected some UTF-16/UCS-2 text. That particular Unicode encoding would have a zero byte in between every ASCII character. The best way to find out is to do a hex dump of you file with something like od -xcb myfile.py. If that is the case, then you'll need to edit the file with something that's able to see those characters, and fix them up. vi would be my first choice (since that's what I'm used to) but I don't want to start any holy wars with the Emacs illuminati. In vi, they'll most likely show up as ^@ characters. share|improve this answer edited Jun 28 '11 at 3:24 answered Jun 28 '11 at 3:12 paxdiablo 491k1189731422 Thank you! The file indeed has zero bytes in between every ASCII character. 0000000 6d69 6f70 7472 0020 0078 006d 006c 002e i m p o r t \0 x \0 m \0 l \0 . \0 151 155 160 157 162 164 040 000 170 000 155 000 154 000 056 000 . How do I remove these? I'm using Eclipse. –Jonathan Drake Jun 28 '11 at 3:20 Perfect. Used vi and had to search/replace on ^@ –Jonathan Drake Jun 28 '11 at 3:33 add a comment| Your Answer
W3C CSS Validation Service? If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: What causes "Lexical error" messages using The W3C CSS Validation Service? Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 09-14-2007,11:51 AM #1 KnoxVol View Profile View Forum Posts Registered User Join Date May 2007 Posts 30 What causes "Lexical error" messages using http://stackoverflow.com/questions/6501115/lexical-error-encountered-0-after The W3C CSS Validation Service? I'm trying to validate my style sheet programming using The W3C CSS Validation Service: http://jigsaw.w3.org/css-validator/ It's giving the following error message Lexical error at line 1, column 3. Encountered: "D" (68), after : "
Can anybody see what's causing the error? Thanks. Reply With Quote 09-14-2007,01:17 PM #2 ray326 View Profile View Forum Posts http://www.webdeveloper.com/forum/showthread.php?160745-What-causes-quot-Lexical-error-quot-messages-using-The-W3C-CSS-Validation-Service Visit Homepage Got Link? Join Date Nov 2003 Location Jerryville, Tejas Posts 11,715 That's HTML, not CSS. Is that the problem? "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan Reply With Quote 09-14-2007,01:50 PM #3 dtm32236 View Profile View Forum Posts You're a nerd. Join Date Aug 2007 Location New Jersey, US Posts 1,779 http://validator.w3.org/ that's what you want validate your CSS with a CSS validator Reply With Quote 09-15-2007,08:36 AM #4 KnoxVol View Profile View Forum Posts Registered User Join Date May 2007 Posts 30 ray326, dtm32236; Thanks for responding. I appreciate the input. What I'm trying to do is validate the CSS. I figured out what was causing the error message. I was copying and pasting all of the Html, instead of just the CSS, from the web page source code into the validator. This page says "Enter the CSS you would like validated:" http://jigsaw.w3.org/css-validator/#validate-by-input You can run the whole web page through the CSS validator. But you have got to use this page: http://jigsaw.w3.org/css-validator/#validate-by-uri I had been working all day yesterday when I made the post. I must have been a little skull numb when I asked the question at the start of this thread. Sorry for theseen: 8 years 21 weeks ago Turkey Timezone: GMT+3 Joined: 2007-07-23 Posts: 8 Points: 0 Hello everyone! https://csscreator.com/node/26040 This is my first post on CSS Creator. I have a https://netbeans.org/bugzilla/show_bug.cgi?id=222184 problem like title. When i try to validate my blog to CSS Validator then appearing this error: Lexical error at line 47, column 81. Encountered: "?" (63), after : "" So, what the hell is it? I don't understand... :jawdrop: Top Tweet Tags: Off lexical error Topic Thu, 2007-10-11 12:00 #1 Tony Offline Moderator Brisbane Last seen: 2 weeks 1 day ago Brisbane Timezone: GMT+10 Joined: 2003-03-12 Posts: 5320 Points: 2941 character Hi fatihturan, A lexical error can be caused by an unknowen character in your stylesheet. Try isolating the error by firstly validating each stylesheet individually. Then comment out sections lexical error at if you nothing jumps out at you. Top Thu, 2007-10-11 12:23 #2 fatihturan Offline newbie Turkey Last seen: 8 years 21 weeks ago Turkey Timezone: GMT+3 Joined: 2007-07-23 Posts: 8 Points: 0 I have found where is I have found where is problem. I'm using Thickbox script for my blog(running at wordpress) and i was added thickbox.css on my header.php file. And this file is not valid for CSS(cuz it's have expression, -moz-opacity, etc. etc.). But i can't remove thickbox.css. So my blog will stay unvalid for css. :shrug: Also thickbox.css file's content is below: /* ----------------------------------------------------------------------------------------------------------------*/ /* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/ /* ----------------------------------------------------------------------------------------------------------------*/ *{padding: 0; margin: 0;} /* ----------------------------------------------------------------------------------------------------------------*/ /* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ /* ----------------------------------------------------------------------------------------------------------------*/ #TB_window { font: 12px Arial, Helvetica, sans-serif; color: #333333; } #TB_secondLine { font: 10px Arial, Helvetica, sans-serif; color:#666666; } #TB_window a:link {color: #666666;} #TB_window a:visited {color: #666666;} #TB_window a:hover {color: #000;} #TB_window a:active {color: #666666;} #TB_window a:focus{color: #666666;} /* -----------------------------
error at line 1, column 0. Encountered: