aoede icon indicating copy to clipboard operation
aoede copied to clipboard

My cmd says that can't read the config file

Open xKingsito opened this issue 3 years ago • 22 comments

xKingsito avatar Jun 30 '22 12:06 xKingsito

Could you please provide more details? What's the full output?

codetheweb avatar Jul 02 '22 16:07 codetheweb

I know what his issue is: He's running Aoede built from source. When building from source i got the same result when running aoede, it would say my config.toml file is nowhere to be found (Arch linux x64)

This doesn't happen when exporting vars instead of using the toml file.

nodgear avatar Jul 21 '22 01:07 nodgear

It might be expecting config.toml to be next to the binary in target/debug or target/release.

codetheweb avatar Jul 26 '22 23:07 codetheweb

Not the case either. image

nodgear avatar Jul 28 '22 23:07 nodgear

It's not working for me either.

@cloudybyte any ideas why it's not working?

codetheweb avatar Aug 03 '22 18:08 codetheweb

Could you please show us your config file? pls censor the tokens ofc

oleggtro avatar Aug 03 '22 18:08 oleggtro

Could you please show us your config file? pls censor the tokens ofc

DISCORD_TOKEN="<CENSORED>.<CENSORED>.<CENSORED>"
SPOTIFY_USERNAME="3a3a4glj34s40sw2ppvd1642l"
SPOTIFY_PASSWORD="<CENSORED>"
DISCORD_USER_ID="175314117924487168"

nodgear avatar Aug 03 '22 23:08 nodgear

Mhm that sounds weird and is definitely a bug. I was able to reproduce it though, so not totally bad news. I'll look into it

oleggtro avatar Aug 04 '22 10:08 oleggtro

should be fixed in #18. can you please confirm the fix @nodgear?

oleggtro avatar Aug 04 '22 12:08 oleggtro

This should be fixed in v0.4.1, please try it out when you get a chance. :)

codetheweb avatar Aug 09 '22 02:08 codetheweb

I got this issue,too. I'm using v0.4.1 currently

jacksight avatar Aug 10 '22 14:08 jacksight

I got this issue,too. I'm using v0.4.1 currently

Have you moved the config file to the same place where the binary is?

nodgear avatar Aug 10 '22 17:08 nodgear

Did the fix work for you @nodgear?

oleggtro avatar Aug 11 '22 20:08 oleggtro

I will be testing right now, had no time to test previously

Edit: Just built again from source (release)

nodge@hsv:release main ✗ 22h23m ✖ ➜ ./aoede
Couldn't read config
Error: Error { tag: Tag(Default, 1), profile: Some(Profile(Uncased { string: "default" })), metadata: Some(Metadata { name: "TOML file", source: Some(File("/home/nodge/Development/aoede/target/release/config.toml")), provide_location: Some(Location { file: "src/lib/config.rs", line: 19, col: 14 }), interpolater:  }), path: ["DISCORD_USER_ID"], kind: InvalidType(Str("175314117924487168"), "u64"), prev: None }

file list:

total 32468
-rwxr-xr-x   2 nodge nodge 33154328 ago 11 21:28 aoede
-rw-r--r--   1 nodge nodge      190 ago 11 21:28 aoede.d
drwxr-xr-x 103 nodge nodge     4096 ago 11 21:21 build
-rw-r--r--   1 nodge nodge      198 ago 11 21:29 config.toml
drwxr-xr-x   2 nodge nodge    65536 ago 11 21:28 deps
drwxr-xr-x   2 nodge nodge     4096 ago 11 21:21 examples
drwxr-xr-x   2 nodge nodge     4096 ago 11 21:21 incremental

image

nodgear avatar Aug 12 '22 00:08 nodgear

Oops I forgot to change the sample config after the patch. You need to remove the quotes around the user id

oleggtro avatar Aug 12 '22 12:08 oleggtro

I open the aoede file on my mac, and then it opens the terminal, and my config.toml is in the release folder. When I execute it, it says: Couldn't read config Missing field: 'DISCORD_TOKEN'

Saving session...completed.

I don't know what happened...

This is my config file: DISCORD_TOKEN= xxxxxxxxxxxxxxxxxxxxxxxx SPOTIFY_USERNAME= [email protected] SPOTIFY_PASSWORD= xxxxxxxxx DISCORD_USER_ID= xxxxxxxxxxxxxx

jacksight avatar Aug 12 '22 14:08 jacksight

The config is supposed to look like this:

DISCORD_TOKEN="Mjk3ODQzNDgzNzgzODU2MjMw.SxDNko.UOdRWlDuz_lFrTOeQWEuzKGBmDFdVTGns3jd4o"
SPOTIFY_USERNAME="[email protected]"
SPOTIFY_PASSWORD="MySpotifyPassword"
DISCORD_USER_ID=301780655019130880

oleggtro avatar Aug 12 '22 15:08 oleggtro

I've tried both ways, it's not working

jacksight avatar Aug 13 '22 04:08 jacksight

Well, can you provide error logs? Please copy paste the example config above and only replace the values in there. Leave the quotes as they are.

oleggtro avatar Aug 13 '22 08:08 oleggtro

DISCORD_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" SPOTIFY_USERNAME="[email protected]" SPOTIFY_PASSWORD="xxxxxxxxxxxxxxx" DISCORD_USER_ID=476622988385714176

(base) jacksight@jacksight-MacBook-Pro ~ % /Users/jacksight/aoede/target/release/aoede ; exit; Couldn't read config Missing field: 'DISCORD_TOKEN'

Saving session...completed.

jacksight avatar Aug 13 '22 08:08 jacksight

So...... What seems to be the problem?

jacksight avatar Aug 17 '22 02:08 jacksight

That looks right to me. Are you able to try passing in via the environment instead?

codetheweb avatar Aug 18 '22 02:08 codetheweb

same problem :(

Knopfi02 avatar Jun 25 '23 19:06 Knopfi02

Are you using a mac as well? @Knopfi02

oleggtro avatar Jun 27 '23 12:06 oleggtro

No, I'm on windows @cloudybyte

Knopfi02 avatar Jun 27 '23 19:06 Knopfi02

Are you executing the binary via double-clicking it? If yes, please try opening via command line/powershell. Note: you need to be in aoedes root directory for this to work.

oleggtro avatar Jun 28 '23 03:06 oleggtro