Skip to content

Commit

Permalink
Fix read file (#1100)
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm committed Jan 12, 2024
1 parent dd0c408 commit 98d7df9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nglview/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,8 @@ def _load_data(self, obj, **kwargs):
ext=kwargs.get('ext'),
compressed=kwargs.get('compressed'))
# assume passing string
blob = fh.read()
passing_buffer = not fh.use_filename
blob = fh.read(force_buffer=True)
passing_buffer = True

if fh.ext is None and passing_buffer:
raise ValueError('must provide extension')
Expand Down

0 comments on commit 98d7df9

Please sign in to comment.