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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:34:06+00:00 2026-05-21T05:34:06+00:00

again i am struggling with something although it might be a little simpler to

  • 0

again i am struggling with something although it might be a little simpler to fix unlike the binary arrays with my last post. Basically, I created a timer object with a function name. Yet, I keep getting a problem because it says that the function that i call is not defined under Name Error.

class DrawBot():
    waitingt = Timer(30.0, lockmap)
    ...
    def onlockmap(self, user):
        self.onBackup(user, "lockmapbackup")
        waitingt.start()

    def lockmap():
        onrestoremap("lockmapbackup")


NameError: name 'lockmap' is not defined
  • 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-05-21T05:34:07+00:00Added an answer on May 21, 2026 at 5:34 am

    lockmap() is part of DrawBot(), so if you were to call it by itself, you’d get a NameError.

    Try calling it by using self, which references the class:

    waitingt = Timer(30.0, self.lockmap)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm struggling with a situation that I come up again time and time again
Again a SED question from me :) So, same as last time, I'm wrestling
So I'm just struggling with a lot of little things in the web app
I'm (once again) struggling with the creation of precompiled headers in conjunction with gcc
I am struggling (again) with the table from this question: how to optimize this
Once again I am struggling with date formatting in Rails. I am trying to
once again, I'm struggling with porting a Firefox extension to Internet Explorer 7, 8
I'm again struggling at validating inputs. Let's say I edit a customer and the
I need your help once again, guys i'm struggling with a css dropdown menu
this is most probably simple but im struggling a little is it possible to

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.