AttributeError: module 'eel' has no attribute 'updateTasks'
See original GitHub issueDescribe the problem I call an exposed python function “load_data_object”, and it run fine until the row where I try to call a JS function, “updateTasks” throwing the following error:
Traceback (most recent call last):
File "src\gevent\greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "C:\Users\*******\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eel\__init__.py", line 257, in _process_message
return_val = _exposed_functions[message['name']](*message['args'])
File "index.py", line 58, in load_data_object
eel.updateTasks({"task_load_data_object": 1})
AttributeError: module 'eel' has no attribute 'updateTasks'
2020-03-28T14:42:40Z <Greenlet at 0xf9ff7a0: _process_message({'call': 1.0315686370569765, 'name': 'load_data_ob, <geventwebsocket.websocket.WebSocket object at 0x0)> failed with Att
ributeError
Code snippet(s)
index.py
import eel
...
@eel.expose()
def load_data_object():
directories = read_data_directory()
data = []
for directory in directories:
reader_images = list(csv_read(f"data/{directory}/images.csv", delimiter=";"))
reader_owners = list(csv_read(f"data/{directory}/owners.csv", delimiter=";"))
reader_extra = list(csv_read(f"data/{directory}/extra.csv", delimiter=";"))
obj = {
"images": reader_images,
"owners": reader_owners,
"extra": reader_extra
}
data.append({directory: obj})
print("updatetasks")
eel.updateTasks({"task_load_data_object": 1})
return data
...
eel.js
import {store} from "./redux/store";
import {update_tasks} from "./redux/actions";
export const eel = window.eel;
eel.expose(updateTasks)
function updateTasks(data){
alert(data)
store.dispatch(update_tasks(data))
}
index.js
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import {Provider} from 'react-redux'
import {store} from './redux/store'
import {eel} from './eel'
import 'normalize.css/normalize.css'
import '@blueprintjs/core/lib/css/blueprint.css'
import '@blueprintjs/icons/lib/css/blueprint-icons.css'
import '@blueprintjs/datetime/lib/css/blueprint-datetime.css'
import 'antd/dist/antd.css'
import './index.css'
eel.set_host('ws://localhost:8888') // development
ReactDOM.render(
<Provider store={store}>
<App/>
</Provider>,
document.getElementById('root')
)
Desktop:
- OS: Windows 10 1909
- Browser: Chrome 80.0.3987.149
- Eel: 0.12.2
- Python: 3.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
AttributeError: module 'eel' has no attribute 'updateTasks' #263
Describe the problem I call an exposed python function "load_data_object", and it run fine until the row where I try to call a...
Read more >auto-py-to-exe problem with "module 'eel.chrome'"
I want to convert my script to an exe but after installing auto-py-to-exe with -pip ...
Read more >[Solved] AttributeError: 'module' object has no attribute
Click here to subscribe - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww▻Instagram ...
Read more >How to Resolve Module Has No Attribute - Python Error ...
In this tutorial I will be showing you how to MANAGE THE " MODULE HAS NO ATTRIBUTE" ERROR MESSAGE using Python. This is...
Read more >'module' object has no attribute in 3minutes - YouTube
" AttributeError : object has no attribute "Understand how to trouble shoot the error message. Examples used in the video:When you append a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, Dont understand react much, but can you rename your js file to something other than eel.js (as eel library already uses a js file called eel.js). That might be causing the issue but I am not sure.
Is your
eel.js
file ever actually included? The'./eel'
import is the package-provided javascript function. Depending on your directory structure you may need to include it separately (as just'eel.js'
?) or by renaming it as @RahulBadenkal suggested above so it doesn’t conflict with the file that is autogenerated.