compiler

39 views
Skip to first unread message

Markus Christen

unread,
Oct 31, 2012, 3:28:48 AM10/31/12
to django...@googlegroups.com
Good Morning
I have downloaded files, that can helps by my mssql-odbc connection. This is my downloaded file:
 
On lines 188 and 273, i become the message "'return' outside of function". It's not a space/tab fail, i have checked this.
How can i fix this?

Bill Freeman

unread,
Nov 2, 2012, 1:44:04 PM11/2/12
to django...@googlegroups.com
Surely the error message included a line number?

Also, probably not related, but check that there is no whitespace after your line ending back-slashes.  (Hint it is safer to put the opening triple quote before the backslash, and safer yet to put the triple quoted string in a pare of parentheses, the opening one where you have the backslash.)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/uvBBHw13tokJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Markus Christen

unread,
Nov 5, 2012, 4:26:01 AM11/5/12
to django...@googlegroups.com
I have tryed your input, but i have always the same problem... i cant fix it. it doesent work and i dont know why. (i have it in pycharm and there are only these 2 return problems marked.)

Bill Freeman

unread,
Nov 5, 2012, 3:30:31 PM11/5/12
to django...@googlegroups.com
So the error printout doesn't give the line number of the offending return statement?

To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/DMb-vkIM5xsJ.

Nikolas Stevenson-Molnar

unread,
Nov 5, 2012, 4:13:30 PM11/5/12
to django...@googlegroups.com
I know you checked it, but indentation is the only thing I can think of that would cause this. The problem isn't necessarily on the line with the return statement, there may be an earlier line indented incorrectly. Have you tried PyCharm's "Convert Indents" feature? Edit > Convert Indents > To Tabs (or To Spaces).

_Nik
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/DMb-vkIM5xsJ.

Nikolas Stevenson-Molnar

unread,
Nov 5, 2012, 4:18:42 PM11/5/12
to django...@googlegroups.com
I tried copy/pasting the code you linked into PyCharm and it worked fine. Gotta be spacing/indentation somewhere.


_Nik

On 11/5/2012 1:26 AM, Markus Christen wrote:
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/DMb-vkIM5xsJ.

Kurtis Mullins

unread,
Nov 5, 2012, 7:23:12 PM11/5/12
to django...@googlegroups.com
You could use Lint to check your code for syntax errors.
Reply all
Reply to author
Forward
0 new messages