• Register
1 vote
364 views

Problem :

I am very new to programming world. Currently I am trying to learn how to use the flexx to create the GUI website. This is my first program in flex. If I try to compile my code then it gives me below error:

“Attributeerror: type object 'ioloop' has no attribute 'initialized'.”

Please find below my program for your reference.

from flexx import flx

class HelloFlexx(flx.Widget):

def init(self):

        flx.Button(text='Hello')

        flx.Button(text='Flexx')

flexxapp = flx.App(HelloFlexx)

flexxapp.export('example.html',link=0) #export to singe file

flexxapp.launch('browser') #show it now in a broswer

flexx.run() # enter the mainloop

Why am I facing above error ? How can I fix above error?

8 5 2
3,230 points

Please log in or register to answer this question.

2 Answers

1 vote

Solution :

I have gone through your code and I understand that you are a very beginner to programming so you are facing the initial issues.I know the reason behind this error is related to pyzmq and tornado's version. You must try below command to downgrade your tornado.

pip3 install tornado==5

After executing above command your tornado and pyzmq will surely work normally now. Also please refer the versions for other softwares too. Please use the Miniconda. The python version is 3.6.8, pyzmq version is 18.0.1 and the tornado is 5.0.0. After doing all above changes then your current error will be fixed.

8 4
5,680 points
0 votes

Solution:

Appears to be Tornado version 5. There's discussion here: Install Jupyter Notebook on Miniconda


pip uninstall tornado
pip install tornado==4.5.3

This issue has only occured to me as well. My older anaconda environments appear to be performing fine however the environments I have made today appear to have this exact problem which throws AttributeError: type object 'IOLoop' has no attribute 'initialized'.

It appears to be since of the advanced release of tornado==5.0 which released either today or yesterday. I returned back to the last stable version for example tornado==4.5.3 and it performed.

Miniconda is OK however Anaconda is recommend.

I required matplotlib in python, and need jupyter performing. The package will attempt to uninstall matplotlib in case you uninstall tornado, if not you do a force. However, I still require matplotlib, I require that. So I still require to force matplotlib to apply the old version of tornado. Turns out I had two tornado versions, one installed by pip, other installed by conda.

Finally, running these commands obtain jupyter and matplotlib performing again: (Ran it in the conda environment that was broken.)

conda remove tornado --force # keeps matplotlib
pip uninstall tornado
conda install tornado=4.5.3

I earlier had applied pip to install tensorflow library, which I also require, and maybe it brought along the junky tornado v5, not sure.

It was pointed out to me by another (SB) that the following might solve my problem:

C:\Python36>python -m pip install --upgrade pyzmq notebook

 

10 6 4
31,120 points

Related questions

0 votes
1 answer 1.5K views
1.5K views
Problem : I am currently working on a django and I have gotten the below error: “Type object 'datetime.datetime' has no attribute 'datetime'” On a below line: date = datetime.datetime(int(year), int(month), 1) Does someone know any reason for above error?
asked Jan 28, 2020 jwilliam 3.9k points
0 votes
1 answer 2 views
2 views
Problem: How to I Solve this: attributeerror: 'function' object has no attribute HELP! I need help understanding this: attributeerror: 'function' object has no attribute Can someone please help solve this, I am new in python().
asked 1 day ago Mashhoodch 10.2k points
0 votes
1 answer 29 views
29 views
Problem: I want to count the number of times a word is being repeated in the review string I am reading the csv file and storing it in a python dataframe using the below line reviews = pd.read_csv("amazon_baby.csv") The code in the below lines work when I apply it to a single review. print reviews["review"][1] a = reviews["review"][1].split("disappointed") print a b = len(a) print b
asked Feb 23 Mashhoodch 10.2k points
0 votes
1 answer 15 views
15 views
Problem: The code is the following (I am new to Python/Mysql): import mysql.connector conn = mysql.connector.connect(host='localhost',user='user1',password='puser1',db='mm') cursor = conn.cursor() string1 = 'test1' insert_query = """INSERT INTO items_basic_info (item_name) VALUES (%s)""", (string1) cursor.execute(insert_query) conn.commit() When I run this code I get this error:
asked Feb 21 Mashhoodch 10.2k points
0 votes
1 answer 23 views
23 views
Problem: attributeerror: 'series' object has no attribute 'reshape'
asked Feb 18 charles mathews 3.8k points
0 votes
1 answer 18 views
18 views
Problem: attributeerror: 'dataframe' object has no attribute 'sort'
asked Feb 18 charles mathews 3.8k points
0 votes
1 answer 17 views
17 views
Problem: attributeerror: 'dataframe' object has no attribute 'data'
asked Feb 18 charles mathews 3.8k points
0 votes
1 answer 29 views
29 views
Problem: I have a small problem with list. So i have a list called l: l = ['Facebook;Google+;MySpace', 'Apple;Android'] And as you can see I have only 2 strings in my list. I want to separate my list l by ';' and put my new 5 strings into a new list called ... tried to do this like this: l1 = l.strip().split(';') But Python give me an error: AttributeError: 'list' object has no attribute 'strip'
asked Feb 13 Mashhoodch 10.2k points
0 votes
1 answer 11 views
11 views
Problem: From Python: Attribute Error - 'NoneType' object has no attribute 'something': NoneType what means that instead of an instance of whatever Class or Object you think you're working with? you've actually got None. what That usually means that an assignment or function call up above failed or returned an unexpected result?
asked Jan 27 Mashhoodch 10.2k points
0 votes
1 answer 25 views
25 views
Problem: The CSV file contains 37 attributes + the label (last column). it doesn't contain header or index. Exp of the 1st row: 63651000000.0,63651000000.0,153.1,0,0,0,0,0,0,5,1,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ... "csv2libsvm.py", line 47, in <module> headers = reader.next() AttributeError: '_csv.reader' object has no attribute 'next' Do you have any idea about the problem ?
asked Jan 9 Mashhoodch 10.2k points