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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:16:41+00:00 2026-06-10T23:16:41+00:00

I pulled the latest code using git today and I got the following error:

  • 0

I pulled the latest code using git today and I got the following error:

ImportError at /
cannot import name Like

This might have something to do with circular imports. I examined the traceback:

Traceback:
File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/handlers/base.py" in get_response
  101.                             request.path_info)
File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/urlresolvers.py" in resolve
  298.             for pattern in self.url_patterns:
File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/urlresolvers.py" in url_patterns
  328.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/urlresolvers.py" in urlconf_module
  323.             self._urlconf_module = import_module(self.urlconf_name)
File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/Users/Desktop/python/mystuff/Project/Project/urls.py" in <module>
  7. admin.autodiscover()
File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/contrib/admin/__init__.py" in autodiscover
  29.             import_module('%s.admin' % app)
File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/utils/importlib.py" in import_module
  35.     __import__(name)

The only code in there it looked that could be causing the problem was urls.py. That had the following code:

from django.contrib import admin
admin.autodiscover()

So around this time I notice that the admin.py file that we previously had written was deleted in the latest merge but that the admin.pyc still existed. Deleting the .pyc file proceeded to fix the circular import error and now things seem to work fine.

My question is: what exactly was happening here? Git is configured to ignore all pyc files so after the merge the .pyc stuck around even though the .py was removed. But shouldn’t python be smart enough not to try to call any compiled code in the .pyc if the .py itself was deleted?

  • 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-10T23:16:42+00:00Added an answer on June 10, 2026 at 11:16 pm

    No, in fact, Python will use the .pyc file preferably and only access the .py file if it a) exists and b) is newer than the .pyc file.

    This allows you to distribute a Python app in compiled form without the source code (although it’s not much of a code “obfuscation” technique).

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

Sidebar

Related Questions

I've pulled down the latest Guava from the public git repository. When I try
This morning we pulled from our repo, and git put us on (no branch).
Just pulled latest code and now getting: ...my_app/Gemfile:2:in `evaluate': undefined method `ruby' for #<Bundler::Dsl:0x007fc17c3fc6c8>
I have a datetime that I pulled from the database that looks like this:
Using latest Spring-MVC (3.1.2.RELEASE) I have a pagable REST method something like: @RequestMapping(value =
In a team environment on a Linux system I just pulled the latest code
Using latest JAXB (Sun) and have a hierarchy of schemas that use import directives
I'm pretty new to this Git thing. I tried to commit my work, using
I pulled AQGridView from the latest git repos based on recommendations from here. I
Having just pulled my hair off because of a difference, I'd like to know

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.