#๐ how do i fix this
85 messages ยท Page 1 of 1 (latest)
@earnest venture
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
how do i fix this Syntax error in
File "C:\Users\fwvex\AppData\Local\Programs\Python\Python312\Lib\tokenize.py", line 368, in find_cookie
raise SyntaxError(msg)
SyntaxError: unknown encoding: future_fstrings
Can you share your code and the full error message?
im trying to make
my py
into a exe
but its not working
it keeps saying that
@gray bluff
What tool are you using to bundle your script into an exe?
What are you using to make the exe?
What Python version are you using for PyInstaller? The future_fstrings is something from earlier versions of Python
<@&831776746206265384> : https://discord.com/channels/267624335836053506/1224494719715774495
what
I think you've been told like 4 times from 3 different mods.
bro
We asked you several times at this point to stop asking for help with this.
Okay, then can we see all of your code, and a full traceback?
i dont wanna leak my code
Well, you're gonna have a hard time getting help if you don't
What about the full traceback then?
idk what that even is
This is a traceback. It traces back all the errors that occured.
oooo
There's likely more errors than what you posted there
Huh. Well, then I really don't know what to tell you
Unless we can see the source code, it could be anything
All we know for sure is that on line 368, something ain't encoding correctly
No, that's a file in the standard library
i wdid
the exe
before doing the code
and it worked like a charm
so idk whats going on now
future_fstrings is a backport of f-strings to Pyton <3.6
You are using 3.12, so you should not need the package or the encoding. I would check if PyInstaller is configured for the correct version
Technically the error is here: https://github.com/python/cpython/blob/6abddd9f6afdddc09031989e0deb25e301ecf315/Lib/tokenize.py#L368
Lib/tokenize.py line 368
raise SyntaxError(msg)```
You haven't shared enough information for us to know how to fix it.
!traceback
Please provide the full traceback for your exception in order to help us identify your issue.
While the last line of the error message tells us what kind of error you got,
the full traceback will tell us which line, and other critical information to solve your problem.
Please avoid screenshots so we can copy and paste parts of the message.
A full traceback could look like:
Traceback (most recent call last):
File "my_file.py", line 5, in <module>
add_three("6")
File "my_file.py", line 2, in add_three
a = num + 3
~~~~^~~
TypeError: can only concatenate str (not "int") to str
If the traceback is long, use our pastebin.
I would check what if you are using the PyInstaller that you think you are.
What shows up if you do this: py -m pip list
If you use the command py -m PyInstaller main.py --onefile, does that produce the same error?
You did not include the py portion of the py -m ...
wdym
i did
Syntax error in C:\Users\fwvex\Documents\modbot\modbot2d\main.py
^^^^^^^^^^^^^^^^^^
File "C:\Users\fwvex\AppData\Local\Programs\Python\Python312\Lib\tokenize.py", line 368, in find_cookie
raise SyntaxError(msg)
SyntaxError: unknown encoding: future_fstrings
C:\Users\fwvex\Documents\modbot\modbot2d>
i gtg
be back soon
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.