Spyder module problem

I have made a program; main.py, with an api witch i made seperately in secrets.py …
For some reason i don’t know, spyder does not find the attribute (KEY) in secrets.py.
(But the attribute KEY is defenitly in secrets.py).

Is it possible to help me out with this ?

Without actually seeing how KEY is defined in secrets.py it might be hard to help. If you try accessing KEY in the IPython console, do you get what you expect, or is there another error? Try confirming whether the imported module is the one from the file.

I have add the secrets file (hide a little bit the key ).
I have put the key in the console, but it gave the some issue as in secrets.py…

The biggest mistery is, that the program works in pycharm, and not in spyder.
I am trying spyder, because the value explorer is better then in pycharm (on my oppinion).
I was looking to learn something about json, and so a good variable explorer seems to me helpfull.

Thanks for the reply .

this is for me even a bigger mistery. I have changed the name of secrets.py , to secret.py.

I changed it also in main.py , and now it seems to work.
It’s that it works, but i don’t understand why it didn’t work with secrets.py …
Does anyone has an idea why ??


Nothing concrete, but python has built-in secrets module, so the working theory could be, that for some reason that module is loaded, instead of the secrets.py file.

aah, ok . I didn’t knew python had a secrets build-in module.
It cannot be differant then this issue.

Many thanks sanity !