w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Python: Error while pushing sensor data with raspberry pi to xively TypeError: __init__()

According to this bug report, you can work around this by removing your email address from the feed metadata:

When I removed my e-mail address from the Feed Metadata (through the workbench) and re-ran api.feeds.get(FEED_ID) it worked just fine.

However, when I look at the latest source code on github, I can see that email is supported:

class Feed(Base):
    """Xively Feed, which can contain a number of Datastreams.
    :param title: A descriptive name for the feed
    :param description: A longer text description of the feed
    :param website: The URL of a website which is relevant to this feed
    home page
    :param email: A public contact email address for the provider of this
    :param tags: Tagged metadata about the environment (characters ' " and
    commas will be stripped out)
    :param location: :class:`.Location` object for this feed
    :param private: Whether the environment is private or not.
    :type private: bool
    >>> import xively
    >>> xively.Feed(title="Xively Office environment")
    VERSION = "1.0.0"
    # Set id and feed directly as they aren't part of state. By setting
them on
    # the class they won't get entered into _data and will be set on the
    # instance itself.
    id = None
    feed = None
    _datastreams_manager = None
    def __init__(self, title, description=None, website=None, email=None,
    tags=None, location=None, private=None, datastreams=None):

It seems this bug was only fixed recently (June 27th). Can you try pulling down the latest version of xively-python from github, and use that instead of the current version you have?

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.