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 8280415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:40:00+00:00 2026-06-08T09:40:00+00:00

HELP! Just when I get one thing working, something else doesn’t work! Again, I’m

  • 0

HELP! Just when I get one thing working, something else doesn’t work! Again, I’m sure it’s simple to experienced eyes, but I’m struggling! This is the code where I generate my lists and the data for said lists.

#Frame Creation


allframes = []

for n in range (0, (workingframes*archnodes*3)):
    allframes.append(n)

frames = allframes

print frames



#Frame Population

for f in range (0, workingframes):

    if f<=(workingframes/2):

        for x in range (0, (archnodes)):
            frames[((archnodes*3)+f)].insert(((archnodes*3)+f), (archstartred[x]))
            frames[((archnodes*3)+f+workingframes)].insert(((archnodes*3)+f+workingframes),(archstartgrn[x]))
            frames[((archnodes*3)+f+workingframes*2)].insert(((archnodes*3)+f+workingframes*2),(archstartblu[x]))

        for y in range (0, nodesperframe):
            archstartred.pop()
            archstartgrn.pop()
            archstartblu.pop()
            archstartred.insert(0, backred)
            archstartgrn.insert(0, backgrn)
            archstartblu.insert(0, backblu)

    else:
        for y in range (0, nodesperframe):
            archstartred.pop(0)
            archstartgrn.pop(0)
            archstartblu.pop(0)
            archstartred.append(backred)
            archstartgrn.append(backgrn)
            archstartblu.append(backblu)

        for x in range (0, (archnodes)):
            frames[(archnodes*3)+f].insert((archnodes*3), (archstartred[x]))
            frames[(archnodes*3)+f+workingframes].insert(((archnodes*3)+1),(archstartgrn[x]))
            frames[(archnodes*3)+f+workingframes*2].insert(((archnodes*3)+2),(archstartblu[x]))

I keep getting this lovely error:

AttributeError: 'int' object has no attribute 'insert'

I plan on converting the list to an array after the list is populated so that I can have it manipulated the way it needs to be. I’m sure there’s a much easier way to do this, but I don’t know and I’m new to Python!

  • 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-08T09:40:03+00:00Added an answer on June 8, 2026 at 9:40 am

    These expressions frames[((archnodes*3)+f)] (all 3 versions) evaluate to be integers and you are trying to call an insert() method on them which is the cause of your error.

    f is an integer created in the enclosing for loop, and the way archnodes are used in the first for loop also implies they are numbers. frames is a list of numbers too created in your first loop, so you are indexing into a list of numbers and then trying to call the insert() method on the specific number in the list. As the error message states,

    'int' object has no attribute 'insert'

    the type int does not have an insert method.

    Update re comment above:

    You can add/remove/insert items to the list, but you can’t add/remove/insert to an integer. See this brief tutorial/reference on lists. So for instance to insert an item into a list you’d use this methods/approach:

    list.insert(index, obj)
    

    so in your case

    frames.insert(index, .. )
    

    not

    frames[index].insert(..)
    

    I hope this helps.

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

Sidebar

Related Questions

I just cannot get this to work, would appreciate if someone can help. So
I had this working at one point, so I think I'm just referencing something
I just stuck in a very simple situation bt couldnt help myself.My question is
I just started working on a website that will help people understand what rappers
I'm working on an umbraco website just now and one of the requirements is
I just got help in how to compile this script a few mintues ago
I just need help. Basically I am creating a windows appllication that sends bulk
How can I easily open a new browser with just some help text in
I got some code off the Internet and now I just need help to
Hey This is my login script, using PHP5 and MYSQLi, I just had help

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.