mDjiController icon indicating copy to clipboard operation
mDjiController copied to clipboard

Hello, i have an error in your code

Open Tuburni opened this issue 1 year ago • 9 comments

Exception has occurred: AttributeError 'socket' object has no attribute 'write' File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 125, in send_duml s.write(packet) ^^^^^^^ File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 189, in send_duml(s, 0x0a, 0x06, 0x40, 0x06, 0x24, bytearray.fromhex('01')) AttributeError: 'socket' object has no attribute 'write'

Tuburni avatar Apr 17 '23 17:04 Tuburni

Hi, sounds like it's a different project you're using, as there is no python code in my repo. Looks like you're using the code from here: https://github.com/IvanYaky/DJI_RC-N1_SIMULATOR_FLY_DCL


Cool project, @IvanYaky , I added a link to it from my readme :)

Matsemann avatar Apr 19 '23 07:04 Matsemann

Ok, maybe your project will work with remote from DJI Mavik 3?

Tuburni avatar Apr 19 '23 16:04 Tuburni

This project only works for the old DJI (like, 10 years old). For other version see here: https://github.com/Matsemann/mDjiController#mdjicontroller

Matsemann avatar Apr 19 '23 19:04 Matsemann

@Matsemann Hi, thanks

@Tuburni https://github.com/IvanYaky/DJI_RC-N1_SIMULATOR_FLY_DCL works great with Mavic 3 rc-n1(rc23 ) on Windows 11 but it's easy could be modified for Linux

ivnny avatar Apr 20 '23 07:04 ivnny

@Tuburni https://github.com/IvanYaky/DJI_RC-N1_SIMULATOR_FLY_DCL отлично работает с Mavic 3 rc-n1(rc23) в Windows 11, но его легко модифицировать для Linux.

Hi, I have problem in run emulator. Traceback (most recent call last): File "C:\dji\main.py", line 13, in <module> gamepad = vg.VX360Gamepad() File "C:\Users\Xmen\AppData\Local\Programs\Python\Python311\Lib\site-packages\vgamepad-0.0.8-py3.11.egg\vgamepad\win\virtual_gamepad.py", line 115, in init super().init() File "C:\Users\Xmen\AppData\Local\Programs\Python\Python311\Lib\site-packages\vgamepad-0.0.8-py3.11.egg\vgamepad\win\virtual_gamepad.py", line 60, in init assert vcli.vigem_target_is_attached(self._devicep), "The virtual device could not connect to ViGEmBus." AssertionError: The virtual device could not connect to ViGEmBus.

Xmen-ua avatar May 25 '23 08:05 Xmen-ua

@Xmen-ua Please try this:

  1. pip uninstall vgamepad, and install it again: pip install vgamepad (I tested on vgamepad 0.0.8)
  2. If no effect try to remove and reinstall package ViGEmBUs, https://github.com/ViGEm/ViGEmBus/releases

IvanYaky avatar May 28 '23 18:05 IvanYaky

Exception has occurred: AttributeError 'socket' object has no attribute 'write' File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 125, in send_duml s.write(packet) ^^^^^^^ File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 189, in send_duml(s, 0x0a, 0x06, 0x40, 0x06, 0x24, bytearray.fromhex('01')) AttributeError: 'socket' object has no attribute 'write'

I suggest installing pyserial pip3 install pyserial

IvanYaky avatar May 28 '23 18:05 IvanYaky

@IvanYaky reinstalled ViGEmBUs, only 1.16.116 work in my case. Thanks for the help!

Xmen-ua avatar May 29 '23 07:05 Xmen-ua

Hi, when I run the file it closes immediately, I tried to start it via IDLE so it said:```

= RESTART: S:\miniDjiController-master\main.py
Traceback (most recent call last):
  File "S:\miniDjiController-master\main.py", line 6, in <module>
    import serial, pyvjoy, argparse
ModuleNotFoundError: No module named 'serial'

What should i try? P.s: Use Mavic Mini RC

K0KA0 avatar Nov 24 '23 21:11 K0KA0