Skip to content

Extra letters added to my Python Code causing error's. Tried Copilot with not luck. #131643

@William1947

Description

@William1947

Bug report

Bug description:

# Add a code block here, if required ok. ```At line:1 char:70
+ ... python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"&  
"C ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
Unexpected token '"C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"'  
in expression or statement.
At line:1 char:123
+ ... n.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"&       
"C:/Use ...
At line:1 char:246
+ ... n.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"&       
C:/User ...
+                                                                 ~       
The ampersand (&) character is not allowed. The & operator is reserved    
for future use; wrap an ampersand in double quotation marks ("&") to      
pass it as part of a string.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRe  
   cordException
    + FullyQualifiedErrorId : UnexpectedToken

rams/Python/Python313/python.exe& C:/Users/rwmas/AppData/Local/Programs/Py
thon/Python313/python.exe "c:/Users/rwmas/OneDrive/Desktop/A10 Python/hell
o.py"
At line:1 char:99
+ ... 0 Python"/AppData/Local/Programs/Python/Python313/python.exe&       
C:/User ...
+                                                                 ~       
The ampersand (&) character is not allowed. The & operator is reserved    
for future use; wrap an ampersand in double quotation marks ("&") to      
pass it as part of a string.
   cordException
    + FullyQualifiedErrorId : AmpersandNotAllowed

PS C:\> /AppData/Local/Programs/Python/Python313/python.exe&
At line:1 char:52
+ /AppData/Local/Programs/Python/Python313/python.exe&
+                                                    ~
The ampersand (&) character is not allowed. The & operator is reserved
for future use; wrap an ampersand in double quotation marks ("&") to
pass it as part of a string.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRe
   cordException
    + FullyQualifiedErrorId : AmpersandNotAllowed

PS C:\>
PS C:\>
 *  History restored 

hon.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
At line:1 char:70
At line:1 char:70
At line:1 char:70
At line:1 char:70
At line:1 char:70
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
At line:1 char:70
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
At line:1 char:70
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
At line:1 char:70
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
At line:1 char:70
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
At line:1 char:70
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"       iotatement.
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordExc+ ... 313/python.exe" "C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"     ss
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordExcUnexpected token '"C:/Users/rwmas/OneDrive/Desktop/A10 Python/hello.py"' in expression or statement.      
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken"""


### CPython versions tested on:

3.13

### Operating systems tested on:

Windows

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