RawMouse icon indicating copy to clipboard operation
RawMouse copied to clipboard

Rawmouse not loading in Cura 5 beta

Open scotfor opened this issue 2 years ago • 22 comments

I get the following when starting cura 5: rawmouse error

Cura 5 plugin dir is:

cura 5 plugin dir

I have it working in cura 4.13. This is the plugin directory structure:

cvura 4 13 plugin

scotfor avatar Apr 23 '22 14:04 scotfor

Hi, yes, it's not compatible with Cura 5. I currently have no plans to use Cura 5 so I probably won't be doing the work to make it compatible myself. Sorry about that.

smartavionics avatar Apr 23 '22 14:04 smartavionics

Will you accept a PR if "someone else" does the work?

fieldOfView avatar Apr 30 '22 12:04 fieldOfView

Oh, wait, I see you are/have been working on it...

fieldOfView avatar Apr 30 '22 12:04 fieldOfView

Hi @fieldOfView , yes, I am very happy to receive a PR to help make RawMouse compatible with Cura 5. As you saw, I've made a start and someone has now tried out those changes and reported that it doesn't work so there's more to do.

smartavionics avatar Apr 30 '22 19:04 smartavionics

My SpaceMouse is at my office. I'll try to have a look monday.

fieldOfView avatar Apr 30 '22 20:04 fieldOfView

Thanks, but I think the problem at the moment is with the hidapi library I am using and until I get that fixed, it's not worth looking at the RawMouse code. Cheers, mb

smartavionics avatar May 01 '22 12:05 smartavionics

@smartavionics - thanks for working on making Rawmouse cura 5 compatible.

scotfor avatar May 02 '22 13:05 scotfor

Hi @fieldOfView. Aldo, I've made some changes and it now loads the hidapi module but my guinea pig reports that it still doesn't work. Looking at the cura.log, it appears that the thread that is started to open the HID device and read HID events never actually runs. Are you aware of any differences in Cura/Qt/Python that affect thread starting/scheduling? If you have any free time and want to have a play, please pull the master branch. Cheers, mb.

smartavionics avatar May 03 '22 08:05 smartavionics

Hi @fieldOfView , I think I have found the bug, the thread was being started but was silently dying because I was using removed methods from the QTime class. I changed QTime to QElapsedTimer and that should fix it. Just waiting for the next report from the tester...

smartavionics avatar May 03 '22 21:05 smartavionics

I believe it's now working OK with Cura 5, try https://github.com/smartavionics/RawMouse/releases/tag/1.2.1

smartavionics avatar May 04 '22 09:05 smartavionics

Thanks Mark. It does work for me in Windows 10.

scotfor avatar May 05 '22 12:05 scotfor

Confirmed to work in latest 5.0 win10

jxer avatar Jun 01 '22 18:06 jxer

Doesn't work for me in 5.4.0

CE3-Caspernicus avatar Oct 18 '23 01:10 CE3-Caspernicus

It works works for Cura 5.4. Simply install the latest version from this repository here: https://github.com/smartavionics/RawMouse/releases

DivingDuck avatar Oct 18 '23 06:10 DivingDuck

Here's the error in the log:

2023-10-18 18:19:03,932 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: Exception: Import error loading module RawMouse 2023-10-18 18:19:03,933 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: Traceback (most recent call last): 2023-10-18 18:19:03,933 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "UM\PluginRegistry.py", line 730, in _findPlugin 2023-10-18 18:19:03,933 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: module = imp.load_module(plugin_id, file, path, desc) # type: ignore #MyPy gets the wrong output type from imp.find_module for some reason. 2023-10-18 18:19:03,934 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "imp.py", line 245, in load_module 2023-10-18 18:19:03,934 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "imp.py", line 217, in load_package 2023-10-18 18:19:03,934 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 719, in _load 2023-10-18 18:19:03,935 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 688, in _load_unlocked 2023-10-18 18:19:03,935 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 883, in exec_module 2023-10-18 18:19:03,936 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "", line 241, in _call_with_frames_removed 2023-10-18 18:19:03,936 - ERROR - [MainThread] UM.PluginRegistry.findPlugin [732]: File "C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse_init.py", line 4, in 2023-10-18 18:19:03,936 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: from . import RawMouse 2023-10-18 18:19:03,937 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: File "C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse\RawMouse.py", line 23, in 2023-10-18 18:19:03,937 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: from PyQt5.QtCore import QObject, QTime 2023-10-18 18:19:03,937 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: ModuleNotFoundError: No module named 'PyQt5' 2023-10-18 18:19:03,938 - WARNING - [MainThread] UM.PluginRegistry._populateMetaData [824]: Could not find plugin RawMouse 2023-10-18 18:19:03,942 - ERROR - [MainThread] UM.PluginRegistry._findPlugin [732]: Exception: Import error loading module RawMouse

CE3-Caspernicus avatar Oct 19 '23 01:10 CE3-Caspernicus

Hi @ledgend78 , are you using the latest release as suggested by @DivingDuck ?

smartavionics avatar Oct 19 '23 08:10 smartavionics

This looks bad. Are you sure having the latest version correctly installed?

Maybe this will help you:

Please make a save copy of your file C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse\config.json and then delete the complete directory: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse C:\Users\skull\AppData\Roaming\cura\5.4\plugins\FastView

In addition delete the files (if exists): C:\Users\skull\AppData\Roaming\cura\5.4\plugins\.gitignore C:\Users\skull\AppData\Roaming\cura\5.4\plugins\README.md

Now download the plugin from here (Source Code (zip)): https://github.com/smartavionics/RawMouse/releases/tag/1.2.1 and unzip the file. Now copy the complete folder RawMouse-1.2.1 into the plugin directory: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\

It should look like: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse-1.2.1

The last step is to copy your previously saved configuration file config.json to this location: C:\Users\skull\AppData\Roaming\cura\5.4\plugins\RawMouse-1.2.1\RawMouse\ (this step us only needed if you had modified your configuration file)

Before you start Cura again: please rename or delete the log file C:\Users\skull\AppData\Roaming\cura\5.4\cura.log. A new log file will help to find problems easier.

By the way, I haven't test the plugin for Cura 5.5 beta. So it is possible that the plugin do not work for this version too. I'm running Cura 4.13.1, 5.3.1 and 5.4.0 on Windows10 pro (x64) and for all of this versions the plugin is working fine.

I'm using a slightly modified version of the config file in case you have a 3Dconnexion Space mouse. With this setup the 3D space mouse behave like in an CAD system like Fusion360: config1.2.1.zip

Don't forget to deactivate the 3Dconnexion driver menu for Cura:

3dconnexion_cura

DivingDuck avatar Oct 19 '23 08:10 DivingDuck

@smartavionics Oh, I was a little bit late. Hope you are doing well. :)

DivingDuck avatar Oct 19 '23 08:10 DivingDuck

Thanks @DivingDuck for supporting this user. I'm fine but don't have a lot of free time for Cura related stuff right now.

smartavionics avatar Oct 19 '23 20:10 smartavionics

It worked, thank you

On Thu, Oct 19, 2023 at 1:13 PM Mark Burton @.***> wrote:

Thanks @DivingDuck https://github.com/DivingDuck for supporting this user. I'm fine but don't have a lot of free time for Cura related stuff right now.

— Reply to this email directly, view it on GitHub https://github.com/smartavionics/RawMouse/issues/20#issuecomment-1771639804, or unsubscribe https://github.com/notifications/unsubscribe-auth/APK35TMRYNLWCG3Z7OUSVCDYAGCWJAVCNFSM5UEXTWEKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGE3DGOJYGA2A . You are receiving this because you were mentioned.Message ID: @.***>

CE3-Caspernicus avatar Oct 20 '23 00:10 CE3-Caspernicus

But all the controls are inverted, how do I change that?

CE3-Caspernicus avatar Oct 20 '23 00:10 CE3-Caspernicus

Try reading the README.md file (as displayed at https://github.com/smartavionics/RawMouse) and you will see the answer.

smartavionics avatar Oct 20 '23 07:10 smartavionics