Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

File changes desynced leading to syntax errors #1929

Open
Tadimsky opened this issue Mar 4, 2020 · 8 comments
Open

File changes desynced leading to syntax errors #1929

Tadimsky opened this issue Mar 4, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@Tadimsky
Copy link

Tadimsky commented Mar 4, 2020

Issue Type: Bug

Python is showing parsing errors on valid code.

image

image

Extension version: 2020.2.64397
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:44:27.652Z)
OS version: Darwin x64 19.3.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 4, 3, 3
Memory (System) 16.00GB (3.20GB free)
Process Argv -psn_0_102425
Screen Reader no
VM 0%
@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Mar 4, 2020
@jakebailey
Copy link
Member

I can't reproduce this. Can you give exactly the file up to those errors? Are you certain those parenthesis/commas aren't some unicode-variant Python cannot accept?

@Tadimsky
Copy link
Author

Tadimsky commented Mar 5, 2020

If I close VS Code and open it again it's fine. So it's not something wrong with the file - the extension seems to sometimes get confused.

@jakebailey
Copy link
Member

Still need the code to be able to try it out myself, as I still cannot reproduce it. Even if it's just the first 25 lines you show in the screenshot. See also https://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#filing-an-issue

@Tadimsky
Copy link
Author

Tadimsky commented Mar 5, 2020

Sure thing, here we go:

import json
from datetime import datetime

from log_config import logging
from metrics import Metrics

from .json_to_df import (
    accepted_carrier_job_columns,
    facilities_columns,
    hypothetical_carrier_job_columns,
    json_to_df,
    shipments_columns,
)
from .massage_raw_input import get_post_process_carrier_jobs, get_post_process_shipments
from .trip_metrics import (
    basic_summary_of_trip_outputs,
    metrics_comparing_trip_and_mp,
    basic_inputs_summary,
    summary_shape_of_marketplace_cjs,
    summary_trailer_counts,
)
from .trip_tools import (
    solve_from_dfs_to_trip_selections,
    write_selected_hypothetical_decisions,
)

@Tadimsky
Copy link
Author

Here's another fun one I ran into:

image

Not sure where

unexpected token 'DETELPMOC_PUKCIPKCIPAMpickupCompleted' comes from.

@jakebailey
Copy link
Member

This hints at buffer corruption, rather than an actual parser issue. The squiggle's bounds don't make any sense and that string is definitely wrong.

@MikhailArkhipov
Copy link

Probably another manifestation of #1009 which was mostly fixed, but I guess not entirely.

@pjsg
Copy link

pjsg commented Apr 22, 2020

This one is amazing:

image

And the errors are:

image

Note that the eman is name spelled backwards. eman_gol is log_name.

image

@jakebailey jakebailey changed the title Showing errors on code that are not errors File changes desynced leading to syntax errors Apr 22, 2020
@jakebailey jakebailey added the bug Something isn't working label Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants