GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix #496 · orecore/vscode-python@880edc1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pythonFiles
    • completion.py
    • preview/jedi/api
      • __init__.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pythonFiles/completion.py‎

Copy file name to clipboardExpand all lines: pythonFiles/completion.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def watch(self):
410410
jediPreview = False
411411
cachePrefix = 'v'
412412
if len(sys.argv) > 0 and sys.argv[1] == 'preview':
413-
jediPath = os.path.join(os.path.dirname(__file__), 'preview', 'jedi')
413+
jediPath = os.path.join(os.path.dirname(__file__), 'preview')
414414
jediPreview = True
415415
elif len(sys.argv) > 0 and sys.argv[1] == 'custom':
416416
jediPath = sys.argv[2]
Collapse file

‎pythonFiles/preview/jedi/api/__init__.py‎

Copy file name to clipboardExpand all lines: pythonFiles/preview/jedi/api/__init__.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ def __init__(self, source=None, line=None, column=None, path=None,
105105

106106
if source is None:
107107
# TODO add a better warning than the traceback!
108-
with open(path) as f:
109-
source = f.read()
108+
try:
109+
with open(path) as f:
110+
source = f.read()
111+
except UnicodeDecodeError:
112+
with open(path, encoding=encoding) as f:
113+
source = f.read()
110114

111115
self._source = common.source_to_unicode(source, encoding)
112116
self._code_lines = common.splitlines(self._source)

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.