Skip to content

Including images #52

Description

@binbrain

Its possible to bundle images inside of a bower package by putting it into the bower.json. However, the error below is produced. If line 291 in core is changed to open(..., 'rb') bowerstatic opens the image and serves it, not in the correct way obviously, but it works.

I'm not sure if this if is in supposed to work differently and I'm doing something wrong, if image inclusion just hasn't been added as a feature yet, or if its an oversight.

  File "eggs/bowerstatic-0.8.1-py3.4.egg/bowerstatic/core.py", line 291, in content
    return f.read()
  File "Python3.4.2/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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