Why is the text located inside the multi-line comment causing a syntax error in my python script? /u/Draggador Python Education

(edit: it was resolved by appending “r” in the beginning of the comment, just before the quotation marks, to turn it into a raw string)

terminal console messages for my command:

PS C:Usersdev> python 'C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py'

File "C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py", line 315

"""

^^^

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 6-7: truncated UXXXXXXXX escape

PS C:Usersdev>

relevant part of the code (the lines from 313 to 323):

# terminal output log saved below

"""

PS C:Usersdev> cd 'C:a-c-151_(o-c-091)'

PS C:a-c-151_(o-c-091)> python 'C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py'

Traceback (most recent call last):

File "C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py", line 8, in <module>

import geopandas as gpd

ModuleNotFoundError: No module named 'geopandas'

PS C:a-c-151_(o-c-091)>

"""

submitted by /u/Draggador
[link] [comments]

​r/learnpython (edit: it was resolved by appending “r” in the beginning of the comment, just before the quotation marks, to turn it into a raw string) terminal console messages for my command: PS C:Usersdev> python ‘C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py’ File “C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py”, line 315 “”” ^^^ SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 6-7: truncated UXXXXXXXX escape PS C:Usersdev> relevant part of the code (the lines from 313 to 323): # terminal output log saved below “”” PS C:Usersdev> cd ‘C:a-c-151_(o-c-091)’ PS C:a-c-151_(o-c-091)> python ‘C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py’ Traceback (most recent call last): File “C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py”, line 8, in <module> import geopandas as gpd ModuleNotFoundError: No module named ‘geopandas’ PS C:a-c-151_(o-c-091)> “”” submitted by /u/Draggador [link] [comments] 

(edit: it was resolved by appending “r” in the beginning of the comment, just before the quotation marks, to turn it into a raw string)

terminal console messages for my command:

PS C:Usersdev> python 'C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py'

File "C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py", line 315

"""

^^^

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 6-7: truncated UXXXXXXXX escape

PS C:Usersdev>

relevant part of the code (the lines from 313 to 323):

# terminal output log saved below

"""

PS C:Usersdev> cd 'C:a-c-151_(o-c-091)'

PS C:a-c-151_(o-c-091)> python 'C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py'

Traceback (most recent call last):

File "C:a-c-151_(o-c-091)uk-land-registry-data-pipeline.py", line 8, in <module>

import geopandas as gpd

ModuleNotFoundError: No module named 'geopandas'

PS C:a-c-151_(o-c-091)>

"""

submitted by /u/Draggador
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *