Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:58:45+00:00 2026-06-10T05:58:45+00:00

I am running isympy within emacs shell (emacs 24, debian, snapshot) I do not

  • 0

I am running isympy within emacs shell (emacs 24, debian, snapshot)
I do not have much experience with Python!! The following is driving me nuts:

In [77]: k=0

In [78]: for i in range(3):
   ....: for j in range(3):
   ....:     if i <= j:
   ....:        for l in range(6):
   ....:            J[k,l] = diff(Y[i,j], vars[l])
   ....:        k = k+1
   ....:     else:
   ....:        pass
   ....:     continue
   ....: 

IndentationError: unindent does not match any outer indentation level

(I have tried MANY variations on this!)

I do believe the code is correct, but isympy do not think so!!

¿What is wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:58:47+00:00Added an answer on June 10, 2026 at 5:58 am

    The second for-loop needs to be indented from the first, so instead of

    In [78]: for i in range(3):
       ....: for j in range(3):
    

    have

    In [78]: for i in range(3):
       ....:    for j in range(3):
    

    Also, the

    else:
       pass 
    

    doesn’t really do anything and could be deleted. It’s not clear that continue does much here either.

    Another frequent culprit is an inadvertent mixture of blanks and tabs. PEP 8 – The Style Guide for Python recommends the use of blanks for indentation over tabs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running SQL Server 2008 (not R2). I have a few reports that have URLs
Running rails 3.2.3 with guard/spork/rspec/factory_girl and have the following in my spec helper: Spork.prefork
Running Nh 3.2 using SQLite throws the following exception: ---> NHibernate.HibernateException: Could not create
Running Python, I have an image and some data calculated for different ROIs (regions
Running my script through Devel::NYTProf showed that the following portion of code took up
Running the following line in my script gives me a Permission denied error: $config_out
Running the following program on gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 and Intel(R) Core(TM)2 Duo CPU,
Running this in python will result in a WindowsError stating it cannot find the
Running the following JavaScript code shows 63 in both cases: alert( 0xff >> 2
Running on MySQL 5.5.9 with InnoDB. I created the following trigger: CREATE TRIGGER TRIGGER_Products_Insert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.