Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get this these lines to work #155

Open
RioMarPa opened this issue Jul 7, 2020 · 8 comments
Open

Can't get this these lines to work #155

RioMarPa opened this issue Jul 7, 2020 · 8 comments

Comments

@RioMarPa
Copy link

RioMarPa commented Jul 7, 2020

import numpy as np

import rlcard
from rlcard.agents import CFRAgent #1
from rlcard import models #2
from rlcard.utils import set_global_seed, tournament
from rlcard.utils import Logger

If I remove #1 and #2, the other lines will load. Can't figure out what I am doing wrong.

Thanks

@daochenzha
Copy link
Member

@RioMarPa Hi, could you provide more details? Like what errors you have met?

@RioMarPa
Copy link
Author

RioMarPa commented Jul 7, 2020

Thanks for your quick reply.

I am using Visual Studio 2019.
Using python 3.7 64 bits
Have RLcard ver 2,5 installed

When I try to run the code, it stops at:
from rlcard.agents import CFRAgent
get no error messages just stops

If I remove the above line, it stops at:
from rlcard import models
get no error messages ... just stops

Here is exact code, which runs

import numpy as np

import rlcard
#from rlcard.agents import CFRAgent
#from rlcard import models
from rlcard.utils import set_global_seed
from rlcard.utils import Logger

Make environment

env = rlcard.make('leduc-holdem', config={'seed': 0, 'allow_step_back':True})
eval_env = rlcard.make('leduc-holdem', config={'seed': 0})

print("hello")

Remove the # sign on either line and it stops.

Very strange.

Hope you can help me and thanks

@daochenzha
Copy link
Member

@RioMarPa Have you set any breakpoints in Visual Studio?

@RioMarPa
Copy link
Author

RioMarPa commented Jul 7, 2020

Yes
I set a break point at the first line: from rlcard.agents import CFRAgent
I got a message that pytest needed to be install. I install this.

When I press F11 at break point on the line above .... nothing happens
I get no messages or errors. Just show the console with blinking cursor.

@daochenzha
Copy link
Member

@RioMarPa Have tried directly run the script in the terminal? Like python3 XXX.py

@RioMarPa
Copy link
Author

RioMarPa commented Jul 7, 2020

I get this message:

File testRLcard.py, line 3, in import rlcard
ModuleNotFound; no module name rlcard

@RioMarPa
Copy link
Author

RioMarPa commented Jul 7, 2020

i tried uninstalling rlcard and reinstalling it
see below for details

next a set a break point on first line
then stepped to next line
now i get
"Frame not in module"

screen shot

nothing seems to solve the problem

----- Uninstalling 'rlcard' -----
Found existing installation: rlcard 0.2.5
Uninstalling rlcard-0.2.5:
Successfully uninstalled rlcard-0.2.5
----- Successfully uninstalled 'rlcard' -----
----- Installing 'rlcard' -----
Processing c:\users\scony\appdata\local\pip\cache\wheels\68\61\db\3110466f992ac92d395731b129b77e879f56c8a5fa52bddf6b\rlcard-0.2.5-py3-none-any.whl
Requirement already satisfied, skipping upgrade: matplotlib>=3.0 in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from rlcard) (3.2.1)
Requirement already satisfied, skipping upgrade: packaging in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from rlcard) (20.4)
Requirement already satisfied, skipping upgrade: numpy>=1.16.3 in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from rlcard) (1.18.5)
Requirement already satisfied, skipping upgrade: termcolor in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from rlcard) (1.1.0)
Requirement already satisfied, skipping upgrade: pillow>=5.2.0 in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from rlcard) (7.1.2)
Requirement already satisfied, skipping upgrade: cycler>=0.10 in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from matplotlib>=3.0->rlcard) (0.10.0)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.1 in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from matplotlib>=3.0->rlcard) (2.8.1)
Requirement already satisfied, skipping upgrade: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from matplotlib>=3.0->rlcard) (2.4.7)
Requirement already satisfied, skipping upgrade: kiwisolver>=1.0.1 in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from matplotlib>=3.0->rlcard) (1.2.0)
Requirement already satisfied, skipping upgrade: six in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from packaging->rlcard) (1.14.0)
Installing collected packages: rlcard
Successfully installed rlcard-0.2.5
----- Successfully installed 'rlcard' -----

@daochenzha
Copy link
Member

@RioMarPa I googled "Frame not in module". It seems that the problem is related to VS debugging. I am not sure what the problem is. Have you tried other IDEs, such pycharm or JupyterNotebook?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants