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

The bot crashes with an error during installation prismarine-viewer #393

Closed
glokaykuzdra opened this issue May 23, 2023 · 1 comment
Closed

Comments

@glokaykuzdra
Copy link

I say right away, I use Python. I have a problem with the fact that the bot crashes when using prismarine-viewer. Everything is installed, I even reinstalled it, but an error still occurs.

mineflayer = require('mineflayer')
mineflayerViewer = require('prismarine-viewer').mineflayer

The error that occurs:

Task exception was never retrieved
future: <Task finished name='Task-25' coro=<Dispatcher._process_polling_updates() done, defined at C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py:407> exception=JavaScriptError('require', "Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'prismarine-viewer' imported from C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\javascript\js\deps.js\n at new NodeError (node:internal/errors:400:5)\n at packageResolve (node:internal/modules/esm/resolve:889:9)\n at moduleResolve (node:internal/modules/esm/resolve:938:20)\n at defaultResolve (node:internal/modules/esm/resolve:1153:11)\n at nextResolve (node:internal/modules/esm/loader:163:28)\n at ESMLoader.resolve (node:internal/modules/esm/loader:842:30)\n at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)\n at ESMLoader.import (node:internal/modules/esm/loader:525:22)\n at importModuleDynamically (node:internal/modules/cjs/loader:1151:29)\n at importModuleDynamicallyWrapper (node:internal/vm/module:438:21)")>
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 415, in process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 283, in process_update
return await self.callback_query_handlers.notify(update.callback_query)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\Users\User\PycharmProjects\JavaBot\main.py", line 233, in callback_query
mineflayer.bot_is_online(call_check[1])
File "C:\Users\User\PycharmProjects\JavaBot\mineflayer.py", line 20, in bot_is_online
mineflayerViewer = require('prismarine-viewer')
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\javascript_init
.py", line 37, in require
return config.global_jsi.require(name, version, calling_dir, timeout=900)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\javascript\proxy.py", line 213, in call
else self._exe.callProp(
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\javascript\proxy.py", line 153, in callProp
resp = self.pcall(ffid, "call", method, args, timeout=timeout, forceRefs=forceRefs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\javascript\proxy.py", line 141, in pcall
raise JavaScriptError(attr, res["error"])
javascript.errors.JavaScriptError: ('require', "Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'prismarine-viewer' imported from C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\javascript\js\deps.js\n at new NodeError (node:internal/errors:400:5)\n at packageResolve (node:internal/modules/esm/resolve:889:9)\n at moduleResolve (node:internal/modules/esm/resolve:938:20)\n at defaultResolve (node:internal/modules/esm/resolve:1153:11)\n at nextResolve (node:internal/modules/esm/loader:163:28)\n at ESMLoader.resolve (node:internal/modules/esm/loader:842:30)\n at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)\n at ESMLoader.import (node:internal/modules/esm/loader:525:22)\n at importModuleDynamically (node:internal/modules/cjs/loader:1151:29)\n at importModuleDynamicallyWrapper (node:internal/vm/module:438:21)")

@rom1504
Copy link
Member

rom1504 commented Dec 17, 2023

the error is clearly that prismarine-viewer is not installed

@rom1504 rom1504 closed this as completed Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants