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

Manual play not working #61

Open
marshallgrimmett opened this issue Jul 22, 2020 · 8 comments
Open

Manual play not working #61

marshallgrimmett opened this issue Jul 22, 2020 · 8 comments

Comments

@marshallgrimmett
Copy link

Hi there,

I am having a problem getting the manual play to work.

I get the board to render, but when I click on a column it just says "processing..." and nothing ever happens.

Here's the code:

from kaggle_environments import evaluate, make, utils
env = make("connectx", debug=True)
env.play([None, "negamax"], width=800, height=600)

I have tried using "random" instead of "negamax" and I have also tried switching to second player, but nothing works.

Here are the versions I am using.

Python                        3.7.4
kaggle-environments           1.0.13
jupyterlab                    2.1.4
ipython                       7.13.0

Thank you,
Marshall

@harrisse harrisse self-assigned this Jul 28, 2020
@harrisse
Copy link
Contributor

Thanks for the report, we'll take a look!

@richard-hajek
Copy link

I second this. Reproduction is very easy. This docker-compose.yml:

version: '2.0'
services:
  jupyter:
    image: gcr.io/kaggle-images/python
    command: jupyter lab --allow-root
    volumes:
    - .:/working
    working_dir: /working
    network_mode: "host"
    stdin_open: true
    tty: true
    environment:
        HOME: '/working'

Browser: Firefox 80.0.1 (same result on Google Chrome 85.0.4183.102 (Official Build) (64-bit) )

Result:

image

And this just hangs like that seemingly forever

@SiggyF
Copy link
Contributor

SiggyF commented Aug 22, 2021

I have the same issue. I see the following error in the console log:

Error: IPython Unavailable: TypeError: Cannot read property 'notebook' of undefined
    at about:srcdoc:1171
    at new Promise (<anonymous>)
    at App.contextRef.current.execute (about:srcdoc:1158)
    at App.contextRef.current.act (about:srcdoc:1179)
    at HTMLCanvasElement.<anonymous> (about:srcdoc:332)
(anonymous) @ about:srcdoc:1199
Promise.catch (async)
App.contextRef.current.act @ about:srcdoc:1199
(anonymous) @ about:srcdoc:332

@harrisse harrisse removed their assignment Dec 8, 2021
@bovard
Copy link
Member

bovard commented Apr 1, 2022

I've gone a number of reports on this on the kaggle forums as well. I will try to prioritize to take a look at this.

@SiggyF
Copy link
Contributor

SiggyF commented Apr 19, 2022

The current player code seems to depend on the ipython javascript API. I inspected the kaggle javascript environment using a javascript cell:

%%javascript
// Show python related variables
console.log('vars', Object.keys(window).filter(x => x.toLowerCase().match(/py/)))

This shows that the current kaggle version is using the JupyterLab environment. I couldn't find an easy way (other then by writing a jupyter lab extension to recreate the similar functionality. See also the open issue here .

@FelipeMaldonado
Copy link

I've gone a number of reports on this on the kaggle forums as well. I will try to prioritize to take a look at this.

Is there any progress on this? at least in my case the manual play works if I run locally a Jupyter notebook, but gets stuck in the 'processing' if I run it for example on Google Colab.

@jonahw23
Copy link

jonahw23 commented Aug 8, 2023

I'm having this issue as well, I've tried running a Jupyter notebook locally as well as using Google Colab and the Kaggle Notebooks, but I get the same "Processing" message no matter the enviroment. Any workarounds?

@kafkasl
Copy link

kafkasl commented Nov 18, 2023

I'm having this issue as well, I've tried running a Jupyter notebook locally as well as using Google Colab and the Kaggle Notebooks, but I get the same "Processing" message no matter the enviroment. Any workarounds?

hey it didn't work for me using Jupyter Lab but it did work using normal notebooks.
In the terminal, instead of runningjupyter lab, run jupyter notebook

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

8 participants