Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

AttributeError: 'NoneType' object has no attribute 'fileno' #64

Copy link
Copy link
@sphaero

Description

@sphaero
Issue body actions

I can't seem to be able to access the file descriptor...

>>> from quick2wire.gpio import pins, In, Out
>>> pins.pin(0, direction=In)
quick2wire.gpio.Pin(0)
>>> pin = pins.pin(0, direction=In)
>>> dir(pin)
['__class__', '__delattr__', '__dict__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__trigger__', '__weakref__', '_bank', '_check_open', '_direction', '_file', '_index', '_interrupt', '_pin_path', '_pull', '_soc_pin_number', '_write', 'bank', 'close', 'closed', 'direction', 'fileno', 'get', 'index', 'interrupt', 'open', 'pull', 'set', 'soc_pin_number', 'value']
>>> pin.fileno()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.2/dist-packages/quick2wire/gpio.py", line 180, in fileno
    return self._file.fileno()
AttributeError: 'NoneType' object has no attribute 'fileno'
>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.