Giter VIP home page Giter VIP logo

gw2rpc's People

Contributors

arxae avatar benlubar avatar komashifx avatar maselkov avatar n1tr0-5urf3r avatar pluckerpluck avatar theraytheone avatar z0n3g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gw2rpc's Issues

Can't be run using wine.

This results in GW2RPC being unusable on MacOS and Linux.

wine gw2rpc.exe
Traceback (most recent call last):
File "run.py", line 4, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "gw2rpc\gw2rpc.py", line 18, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "gw2rpc\api.py", line 5, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module
File "gw2rpc\settings.py", line 83, in
File "gw2rpc\settings.py", line 51, in init
File "configparser.py", line 960, in getitem
KeyError: 'API'
05f8:fixme:imm:ImeSetActiveContext (0000000000281D00, 1): stub
05f8:fixme:imm:ImmReleaseContext (00000000000400B2, 0000000000281D00): stub
05f8:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000011FD70
05f4:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000011FD70

Crash on launch

Whenever I launch the application, it crashes. This crash occurs on both the most recent version on the website (v2.51?) and in 2.52-b1.

Log:

2022-10-05 15:41:43,685:CRITICAL:root: GW2RPC has crashed
Traceback (most recent call last):
  File "gw2rpc\gw2rpc.py", line 734, in main_loop
  File "gw2rpc\lib\discordsdk\discord.py", line 99, in run_callbacks
gw2rpc.lib.discordsdk.exception.internal_error: result 4

Code involved in the trace back:

GW2RPC/gw2rpc/gw2rpc.py

Lines 732 to 745 in 379ed5f

try:
if self.sdk.app:
self.sdk.set_activity(data)
try:
self.sdk.app.run_callbacks()
except sdk_exception.not_running:
# Probably a bug in the SDK library:
# Crashes if discord is started after RPC is already running
# Need to close the sdk connection and continue
# New sdk connection will be opened on next iteration
self.sdk.close()
continue
except BrokenPipeError:
raise GameNotRunningError # To start a new connection

def run_callbacks(self) -> None:
"""
Runs all pending SDK callbacks.
"""
result = Result(self.core.run_callbacks(self.core))
if result != Result.ok:
raise get_exception(result)

Support custom .exe names

So I happen to have a super weird issue with GW2 where the game will immediately crash if I run "gw2-64.exe"

What's extra weird is how it will start working again if I simply rename the exe file, in my case to "gw2-64-working.exe"

The exe file is not changed, just renamed....


To support my super weird issue, is there any chance you could add a "custom" exe name into the config file?

It would save me having to actually having to build it myself or actually working out why this weird issue exists...

Custom MumbleLink name support

More of a question and observation. I am not familiar with how mumble link works internally but for my use case, I have to use a custom mumble link name (which I am specifying via gw2launcher, and it's dependent on what gw2launcher sets).

image

This breaks rpc since it uses a hardcoded name as well (https://github.com/Maselkov/GW2RPC/blob/master/gw2rpc/mumble.py#L39) from what I understand and it always shows "In Character Selection".

My use case is multiboxing + gw2radial. This requires custom mumble link names otherwise there are problems with the overlay. Friendly0Fire/GW2Radial#208

I realize this might be hard for GW2RPC to emulate since it's not an addon and probably cannot access the command line. However what about setting something similar via the config and determining which process is active?

Unclear instructions for "launch_gw2_with_rpc.exe"

On the website you say

To make starting Rich Presence easier, there is an .exe called launch_gw2_with_rpc.exe included in the download. This script launches both GW2 and the RPC addon. For it to work, it needs to be present in GW2FOLDER\addons\gw2rpc . You may then replace your normal GW2 shortcut with it for ease of launching.

Within the downloaded archive, I have

  • config.ini
  • gw2rpc.exe
  • Launch_GW2_with_RPC.exe

So, now, by saying "For it to work, it needs to be present in GW2FOLDER\addons\gw2rpc" I feel confused. Which of those files do I need to place there now? What about the rest?

Missing instance

Hey, not sure if that's the best place to post about this, but couldn't really find anywhere else, I hope you see this.

The Discovering Scarlet's Breakthrough story instance (from Living World season 2, wiki link) is not detected by GW2RPC and causes a crash.

Here's the log from that:

2018-01-16 23:17:42,949:CRITICAL:root: GW2RPC has crashed
Traceback (most recent call last):
  File "gw2rpc\gw2rpc.py", line 291, in main_loop
  File "gw2rpc\gw2rpc.py", line 223, in get_activity
  File "gw2rpc\character.py", line 47, in __init__
  File "gw2rpc\character.py", line 55, in _get_profession
  File "gw2rpc\character.py", line 74, in get_spec
KeyError: 'region_name'

And thanks for that little program, it's pretty cool!

Support for multiple Discord clients

Hello~

A while ago I looked into the changes required to send the RPC data to my DiscordPBT installation, as well as my normal Discord.
Currently, I'm starting two versions of GW2RPC. The normal and a modified installation where i changed this line in rpc.py:

class DiscordRPC:
    def __init__(self, client_id):
        self.ipc_path = r'\\?\pipe\discord-ipc-1'  # Changed 0 to 1

IIRC DiscordRPC can use pipes numbered from 0 to 9- usually, it will use 0 first, then 1, ...
As I have two Discord installations, the pipe they use changes depending on which starts faster x.x

From what I understand you moved away from DiscordRPC to the Discord SDK.
But as I don't have more knowledge on that or your project, I'm merely asking: Is it- with moderate work to do- possible to support multiple installations from the get-go? As in one GW2RPC open and data sent to all available Discord installations.

Or do you know off the top of your head if I can make changes so that the new SDK version uses a different Discord installation?
It still appears to use the first one I opened - or at least not only the normal Discord client.


And as a side note regarding this.
While making my changes and creating my .exe file, I got errors that the discord_game_sdk.dll file was not found. Copying the DLL into the /dist folder, where I executed my version, solved this. Your zip download however didn't need to include the DLL file separate from the .exe. Honestly no clue why not.
Again, I don't really know much about .spec, but including the DLL into the added files got rid of the error and showed the usual info when in-game. Might be a worthwhile change?

added_files = [("locales", "locales"), ('icon.ico', '.'), ('RPC.ico', '.'), ('lib\\discord_game_sdk.dll', '.')]

Thanks for reading~ not really an expert in any of this, so maybe the questions seem strange, idk. >.<

[2.51] Installer won't auto detect GW2 install directory

The default installer path uses the folder name GW2RPC in the game's addon directory, however this causes a problem when trying to run as the program is instead expting to be located in the RPC folder instead, as indicated by this error message.
image

Iterating over the process list while trying to find the game may randomly crash the application

GW2RPC crashed while I was sleeping, hours after the last time GW2 had been running. The log file showed this:

2020-12-04 07:01:48,671:CRITICAL:root: GW2RPC has crashed
Traceback (most recent call last):
  File "site-packages\psutil\_pswindows.py", line 636, in wrapper
  File "site-packages\psutil\_pswindows.py", line 702, in exe
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gw2rpc\gw2rpc.py", line 373, in main_loop
  File "gw2rpc\gw2rpc.py", line 353, in update_gw2_process
  File "site-packages\psutil\__init__.py", line 661, in name
  File "site-packages\psutil\_pswindows.py", line 636, in wrapper
  File "site-packages\psutil\_pswindows.py", line 688, in name
  File "site-packages\psutil\_pswindows.py", line 641, in wrapper
psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=23148)

Looking at the relevant lines on this application's side, my guess is that one of the processes in the given process list exited right at the same time as GW2RPC was iterating over them. Just catching that exception somewhere as well might be enough if that is the case.

Multilanguage Support

Hello Can you make a Multilanguage support by extra text file

i love this Project but i was not good in python

Crash when remote piloting Jade Bot as Core class

The app crashes when you remotely pilot a jade bot, such as in Garden Hights in New Kaineng City, which is an activity for the heart there.

2023-12-23 19:32:23,721:CRITICAL:root: GW2RPC has crashed
Traceback (most recent call last):
  File "gw2rpc\gw2rpc.py", line 724, in main_loop
  File "gw2rpc\gw2rpc.py", line 448, in get_activity
  File "gw2rpc\character.py", line 58, in __init__
  File "gw2rpc\character.py", line 66, in get_elite_spec
KeyError: 10

Provide development instructions

Hey! I was trying to run the code on Win10 with Python Version 3.8.10 with the requirements installed and got this error:

FileNotFoundError: [Errno 2] No translation file found for domain: 'base'

I was using locales_path = resource_path("./locales") and locales_path = resource_path("../locales") each without success. I also compiled gw2rpc myself with pyinstaller and both locales_path each and the same error occurred.

Also, please provide more development instructions:

  • which Python Version(s) are supported to run/build
  • how to call pyinstaller (arguments)

Add new raid bosses to the registry

I think I've done this right:

Map ID: 1303

Coagulated Amalgamate: [14208, 15897], 90
Lagos Twins: [14938, 15300], 250
Qadim: [14030, 14857], 200

I've tested that in game using your code to read the API and convert_mumble_coordinates(), so I think the numbers are valid.

They are such that only the fighting arena is covered (restarting from checkpoint will take you out the area). All bosses.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.