• Register
1 vote
486 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 1
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 4 views
4 views
Problem: I upgraded numpy to the latest version and now I am getting following error on importing numpy: AttributeError: type object 'numpy.ndarray' has no attribute 'array_function' I am using numpy version 1.16.
asked Apr 26 Supti 12.7k points
0 votes
1 answer 4 views
4 views
Problem: any ideas on what i need to do for this problem? attributeerror: type object 'numpy.ndarray' has no attribute '__array_function__'
asked Apr 10 Rohit kr 17.5k points
0 votes
1 answer 53 views
53 views
Problem : I am currently working on a django and I have gotten the below error: “Type object 'datetime.datetime' has no attribute 'datetime'”
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 1.7K views
1.7K 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 3 views
3 views
Problem: I am using tensorflow's models. I set up environment by seeing this web site.It was success until Add Libraries to PYTHONPATH. But when I run python object_detection/builders/model_builder_test.py in models/research directory,AttributeError: module 'pandas' has no attribute 'computation' What should I do to fix this?What is wrong in my code?
asked 1 day ago sumaiya simi 43.9k points
0 votes
1 answer 3 views
3 views
Problem: I am unable to Uninstall " pip uninstall pyopenssl "Using pip gets me this error. Thanks in advance. Additional Details: I am using Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily
asked 1 day ago Moumita Bhowmick 12.4k points
0 votes
1 answer 3 views
3 views
Problem: Could you tell me what I am doing wrong and what I need to do to fix it? Thanks in advance.
asked 2 days ago salim1 60.6k points
0 votes
1 answer 6 views
6 views
Problem: I'm trying to delete the first 24 rows of my pandas dataframe. Searching on the web has led me to believe that the best way to do this is by using the pandas 'drop' function. However, whenever I try to use it, I get the error: AttributeError: 'numpy. ... should do to delete the first 24 rows of my dataframe. (This was all done using Python 3 on a Jupyter notebook on my local machine)
asked 2 days ago muktaa 34.4k points
0 votes
1 answer 2 views
2 views
Problem: Can some body tell me about this problem? Attributeerror: 'nonetype' object has no attribute 'append'.
asked 3 days ago PkGuy 23.5k points
1 vote
1 answer 2 views
2 views
Problem: I am using strptime and facing this issue: Attributeerror: 'module' object has no attribute 'strptime'.
asked 4 days ago PkGuy 23.5k points