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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:56:05+00:00 2026-05-15T20:56:05+00:00

I am trying to do webservice calls with django views using Amara library. However

  • 0

I am trying to do webservice calls with django views using Amara library.

However anytime I do import amara (by simply importing it!) and call a django view with it imported, I get such errors:

Environment:

Request Method: GET
Request URL: http://127.0.0.1:4444/test
Django Version: 1.2.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.admin',
 'azula.epgdb',
 'django_extensions']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response
  80.                     response = middleware_method(request)
File "/usr/local/lib/python2.6/dist-packages/django/middleware/common.py" in process_request
  58.                     _is_valid_path("%s/" % request.path_info, urlconf)):
File "/usr/local/lib/python2.6/dist-packages/django/middleware/common.py" in _is_valid_path
  143.         urlresolvers.resolve(path, urlconf)
File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve
  301.     return get_resolver(urlconf).resolve(path)
File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve
  216.                     sub_match = pattern.resolve(new_path)
File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve
  123.             return self.callback, args, kwargs
File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in _get_callback
  129.             self._callback = get_callable(self._callback_str)
File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py" in wrapper
  124.         result = func(*args)
File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in get_callable
  56.                 lookup_view = getattr(import_module(mod_name), func_name)
File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/uluc/azula/epgdb/views.py" in <module>
  4. from azula.epgdb.utils import EventSet
File "/home/uluc/azula/epgdb/utils.py" in <module>
  6. import amara
File "/usr/lib/pymodules/python2.6/amara/__init__.py" in <module>
  11. import binderytools
File "/usr/lib/pymodules/python2.6/amara/binderytools.py" in <module>
  13. from Ft.Xml import InputSource
File "/usr/lib/python2.6/dist-packages/Ft/Xml/InputSource.py" in <module>
  355. DefaultFactory = InputSourceFactory(catalog=GetDefaultCatalog())
File "/usr/lib/python2.6/dist-packages/Ft/Xml/Catalog.py" in GetDefaultCatalog
  579.                 catalog = Catalog(uri, quiet)
File "/usr/lib/python2.6/dist-packages/Ft/Xml/Catalog.py" in __init__
  95.             self._parseXmlCat(data)
File "/usr/lib/python2.6/dist-packages/Ft/Xml/Catalog.py" in _parseXmlCat
  372.         from Ft.Xml.Sax import CreateParser
File "/usr/lib/python2.6/dist-packages/Ft/Xml/Sax.py" in <module>
  242. class SaxPrinter(ContentHandler):
File "/usr/lib/python2.6/dist-packages/Ft/Xml/Sax.py" in SaxPrinter
  247.     def __init__(self, printer=XmlPrinter(sys.stdout, 'utf-8')):
File "/usr/lib/python2.6/dist-packages/Ft/Xml/Lib/XmlPrinter.py" in __init__
  39.         self.stream = sw = cStreamWriter.StreamWriter(stream, encoding)

Exception Type: TypeError at /test
Exception Value: argument must have 'write' attribute

How can this be solved ? I tried this under either Debian Lenny & Ubuntu 10.04 yet via Django SVN version and Amara 1

I am suspicious of some character encoding problem.

  • 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-15T20:56:06+00:00Added an answer on May 15, 2026 at 8:56 pm

    Putting “WSGIRestrictStdout Off” to my apache fixed the issue as said in here.

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

Sidebar

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.