error with 'python give_items.py` #6851
Replies: 3 comments 2 replies
-
Unlike dbtool, it looks like a lot of these are designed to be run from the tools folder and not the repo root. So CD into the tools folder and run the script from there |
Beta Was this translation helpful? Give feedback.
-
That’s where i run it from, it’s in the tools folder I had to run it via
terminal because if I just open it it closes right away
…On Sun, Jan 26, 2025 at 6:10 AM Zach Toogood ***@***.***> wrote:
Unlike dbtool, it looks like a lot of these are designed to be run from
the tools folder and not the repo root. So CD into the tools folder and run
the script from there
—
Reply to this email directly, view it on GitHub
<#6851 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BN4ONDUOE5S76EQNRXUNCCL2MTGCBAVCNFSM6AAAAABV4HR6YGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOJVG43TCMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
There's an issue with the regex parsing db credentials. It's a pretty simple fix but for some reason it's still not writing the vars to the db. Lines 37 to 39 in e6e34bb Should be: match = re.findall(r"(SQL_\w+)\s*=\s*(?:\"(.*?)\"|([^\"\s,]+)),", line)
if match:
credentials[match[0][0]] = match[0][2] if match[0][2] else match[0][1]
However, nothing ends up in the db. Running the query |
Beta Was this translation helpful? Give feedback.
-
when i run this i get these errors any fixes for that ?
#Loading settings/network.lua
Traceback (most recent call last):
File "C:\New folder\server\tools\give_items.py", line 164, in
main()
~~~~^^
File "C:\New folder\server\tools\give_items.py", line 145, in main
connect()
~~~~~~~^^
File "C:\New folder\server\tools\give_items.py", line 41, in connect
database = credentials["SQL_DATABASE"]
~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'SQL_DATABASE'
i havent modified anything in this file, the server itself runs and works as is
Beta Was this translation helpful? Give feedback.
All reactions