question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After using pyforest the console keep output "<IPython.core.display.Javascript object>"

See original GitHub issue

Issue Description

pyforest keep output <IPython.core.display.Javascript object>

  • Operating System: win 10
  • Python Version: $ python --version 3.7.4, anaconda
  • How did you install pyforest: (pip, conda, or other (please explain)) pip
  • Python packages: $ pip freeze or $ conda list (please include pyforest) packages.txt

Description of Issue

my User import file

# Add your imports here, line by line
# e.g

import datetime
from aip import AipOcr
from aip import AipSpeech
import pandas as pd
from pathlib import Path
import re
import math
import lizhelib
import wave
import struct
import pyaudio
from PIL import Image
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import QEvent, Qt, pyqtSlot
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout, QLineEdit, QLabel
from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QPushButton, QAction, QLineEdit, QMessageBox
from colour import Color

import speech_recognition as sr
from fuzzyfinder import fuzzyfinder
from io import BytesIO
import lizhelib.win_operation
from lxml import html
from os import path
from scrapy import Selector

from scrapy.cmdline import execute
from selenium import webdriver
import PySimpleGUI as sg
import futures
import glob
import importlib
import inspect
import json
import os
import pandas as pd
import pyautogui
import random
import re
import requests
import scrapy
import shutil
import subprocess
import sys
import tempfile
import threading
import time
import win32clipboard
import wptools
import zipfile

Keep print IPython,

image

Even I make a simple script like this still get the error.

image

Reproduction Steps

  1. Write some simple code.
  2. Import pyforest
  3. then Keep print Ipython …

What steps have you taken to resolve this already?

I try to delete some package in the user import file. I just leave 1 package in it which is time package

And my script is just like the code in the pic above Simple loop print, But the repeated IPython things print still happen.

How to solve it ?

Anything else?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Henryhaohaocommented, Mar 10, 2021

@woshichuanqilz Hello, you can comment out lines 105 to 113 in the _importable.py file, which is the “display” function in the “_update_import_cell” function definition.Then can not print <IPython.core.display.Javascript object>.

666666

1reaction
8080labscommented, Jan 31, 2020

Hi, thank you for the report and all the details. This made it easy to help you 😃

Please note the following:

  1. pyforest is currently only supposed to run in Jupyter Notebook/Lab. This is also the reason why you see the Display.Javascript error. This error might be suppressed via adding a flag that it is not running in Jupyter. eg via adding a new method “pyforest.deactivate_javascript()” If this method is called, a flag will be toggled that suppresses the js
  2. I saw that you imported “from pyforest import *” This is the old way. In version 1.0.0 we changed this to “import pyforest”
  3. Nice to see that you are using a custom imports script. Please note that you can only import one name per line. Eg “from PyQt5.QtCore import QEvent, Qt, pyqtSlot” is not supported yet. You need to write this on separate lines
Read more comments on GitHub >

github_iconTop Results From Across the Web

Matplot-lib 2.2.3 plots no longer working in my Python 3.7 ...
MESSAGE after code is run: "IPython.core.display.Javascript object" "IPython.core.display.HTML object". This same code works fine in a ...
Read more >
Suppress the message <IPython.core.display.Javascript object>
Hello friends, I am using python 3.8 with jupyter notebook; following are the details regarding the version; jupyter core : 4.6.3 ...
Read more >
pyforest - PyPI
pyforest offers the following solution: You can use all your libraries like you usually do. If a library is not imported yet, pyforest...
Read more >
Jupyter Notebooks | Everything I know - My Knowledge Wiki
Colaboratory - Free Jupyter notebook environment that requires no setup and runs entirely in the cloud. pyforest - Lazy-imports all popular Python Data...
Read more >
15 Data Science hacks to speed up analysis - Kaggle
Explore and run machine learning code with Kaggle Notebooks | Using data from ... /opt/conda/lib/python3.7/site-packages/IPython/core/display.py:701: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found