kulpa / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

django_sample not working : from apiclient.ext.django import FlowThreeLeggedField ImportError: No module named ext.django #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. python manage syncdb command at the project.

What is the expected output? What do you see instead?
I am suppose to have the tables built. But i received the following instead 
after running python manage syncdb :

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/validation.py", line 28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 146, in get_app_errors
    self._populate()
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 64, in _populate
    self.load_app(app_name)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 78, in load_app
    models = import_module('.models', app_name)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/eugene/public_html/django/tabshift/../tabshift/buzz/models.py", line 8, in <module>
    from apiclient.ext.django import FlowThreeLeggedField
ImportError: No module named ext.django

What version of the product are you using? On what operating system?
version 0.1. On ubuntu 10.04

Please provide any additional information below.
i installed the client using sudo python setup.py install.
I checked the .egg file and noticed that there is no /ext folder in apiclient. 

there might be an error in installation process.

Original issue reported on code.google.com by ye.eug...@gmail.com on 30 Oct 2010 at 12:07

GoogleCodeExporter commented 9 years ago
Thanks for catching that. Could you try patching the setup.py file with the 
attached patch, and re-installing?

Original comment by tom.h.mi...@gmail.com on 30 Oct 2010 at 10:10

Attachments:

GoogleCodeExporter commented 9 years ago
hello, i've tried your patch and ran sudo python install setup.py again.

But i received the following error:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/validation.py", line 28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 146, in get_app_errors
    self._populate()
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 64, in _populate
    self.load_app(app_name)
  File "/usr/local/lib/python2.6/dist-packages/django/db/models/loading.py", line 78, in load_app
    models = import_module('.models', app_name)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/eugene/public_html/django/tabshift/../tabshift/buzz/models.py", line 8, in <module>
    from apiclient.ext.django import FlowThreeLeggedField
  File "/usr/local/lib/python2.6/dist-packages/google_api_python_client-0.1-py2.6.egg/apiclient/ext/django.py", line 1, in <module>
    from django.db import models
ImportError: No module named db

It seems that django.db is not being imported.

But my djanog installation works fine and i've been using it for about 1.5 
years.

Any idea how I can fix this?

Original comment by ye.eug...@gmail.com on 31 Oct 2010 at 5:45

GoogleCodeExporter commented 9 years ago
Yup, looks like a re-naming issue. I've attached another patch -- you should be 
able to apply this one directly to the installed files, no need to re-install.  
Let us know how it works out. Thanks!

Original comment by tom.h.mi...@gmail.com on 1 Nov 2010 at 12:20

Attachments:

GoogleCodeExporter commented 9 years ago
revision 87c25aadf0 fixes the issue, revision de627a9efc fixes the problem 
mentioned in comment 2. Note that the patch in comment 3 isn't the same 
solution as the one in the trunk. The trunk has a more descriptive naming 
scheme that solves the problem.

If you're still having problems after pulling the latest changes, please let us 
know. Thanks!

Original comment by tom.h.mi...@gmail.com on 1 Nov 2010 at 10:39