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

[BUG] the web is empty #2522

Open
4 tasks
h-bo opened this issue Jan 14, 2023 · 4 comments
Open
4 tasks

[BUG] the web is empty #2522

h-bo opened this issue Jan 14, 2023 · 4 comments
Labels
bug Bug fixes

Comments

@h-bo
Copy link

h-bo commented Jan 14, 2023

System information

  • win10 (e.g., Linux Ubuntu 16.04):
  • Python3.8.3 (python --version):
  • 0.18.0 (fiftyone --version):
  • pip (pip or source):

Commands to reproduce

As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue. Application steps can be described in the next section.

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")

if name == "main":
# Ensures that the App processes are safely launched on Windows
session = fo.launch_app(dataset, port =5152)
session.wait()

Describe the problem

Describe the problem clearly here. Include descriptions of the expected behavior and the actual behavior.
image
image

the web is empty.
change explorer does not work

Code to reproduce issue

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")

if name == "main":
# Ensures that the App processes are safely launched on Windows
session = fo.launch_app(dataset, port =5152)
session.wait()

Other info/logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Please do not use screenshots for sharing text. Code snippets should be used instead when providing tracebacks, logs, etc.

What areas of FiftyOne does this bug affect?

  • App: FiftyOne application issue
  • Core: Core Python library issue
  • [1 ] Server: FiftyOne server issue

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently
  • [1 ] Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community
  • No. I cannot contribute a bug fix at this time
@h-bo h-bo added the bug Bug fixes label Jan 14, 2023
@h-bo h-bo changed the title [BUG] [BUG] the web is empty Jan 14, 2023
@kaixi-wang
Copy link
Contributor

kaixi-wang commented Jan 18, 2023

Not sure if the spacing was removed when you added the code snippet, but can you try removing the line if name == "main":

Also, are you able to get the app running if you run the code directly in a python console rather than invoking the script?

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart", dataset_name="quickstart with spaces")
session = fo.launch_app(dataset)

@Ceazy-Gentleman
Copy link

Not sure if the spacing was removed when you added the code snippet, but can you try removing the line if name == "main":

Also, are you able to get the app running if you run the code directly in a python console rather than invoking the script?

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart", dataset_name="quickstart with spaces")
session = fo.launch_app(dataset)

I also encounter the bug, it also does not wort when I run the code directly in a python console rather than invoking the script!

@Ceazy-Gentleman
Copy link

Ceazy-Gentleman commented Feb 3, 2023

Hello!I solved the problem according to this answer.And then reboot my computer->run the code in python shell:

import mimetypes
mimetypes.init() 
mimetypes.add_type('application/javascript', '.js')

->

import fiftyone as fo
import fiftyone.zoo as foz

dataset = fo.load_dataset(
    "open-images-v6-validation-200"
)
session = fo.launch_app(dataset,port=5154)

finally, the web and jupyter display the fifiyone visualization of dataset!

@ajaymaity
Copy link

I tried all the above solutions, but none of them worked. It did point me in the right direction and after spending hours on it, I finally figured out the solution. Hoping it would help others too.

You have to change Registry settings for two keys. Open the Registry Editor and

  1. Go to Computer\HKEY_CLASSES_ROOT\.js and change Content Type to application/javascript
  2. Go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js and change Content Type to application/javascript.

Then just restart your shell or jupyter kernel, and the app should start working on localhost. Make sure you force reload the app (Ctrl + Shift + R) to get rid of cached contents.

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

No branches or pull requests

4 participants