Ricardo-Osorio / epicgames-weekly-freegames

Automatically grab the weekly free games made available on epicgames store
MIT License
75 stars 7 forks source link

environment vars not set #18

Closed Gamewalker closed 4 years ago

Gamewalker commented 4 years ago

Hi,

I tried everythinf from bulding it local to using the docker.io repo, I always get:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/main.py", line 239, in <module>
    main()
  File "/usr/local/lib/python3.7/site-packages/main.py", line 218, in main
    if EMAIL:
UnboundLocalError: local variable 'EMAIL' referenced before assignment

any ideas? (I set the EMAIL and PASSWORD vars ...)

CorySanin commented 4 years ago

Can you share the command you used to bring up the docker image?

Gamewalker commented 4 years ago

I digged into it, the vars are set in def read_env_variables(): but not in def main():

if I add global TIMEOUT, LOGIN_TIMEOUT, EMAIL, PASSWORD, LOGLEVEL, SLEEPTIME, TOTP, DEBUG in main, the vars are set ... . Im not familiar with python ..

my run command is: sudo docker run -e EMAIL="XXX" -e PASSWORD="XXX" -e LOGLEVEL=DEBUG epicgames

edit: working fine like that, even with the muti branch

Ricardo-Osorio commented 4 years ago

I can confirm that is happening. I will work on it.

Ricardo-Osorio commented 4 years ago

This issue should have been spotted ealier by me before merging it into master. For now I reverted the commit that introduces it and take a look at afterwards.