damienhaynes / TraktRater

TraktRater is a tool written in C# to help users transfer user episode, show and movie user ratings and watchlists from multiple media database sites around the web.
648 stars 36 forks source link

Letterboxd Imports not working #172

Open SEALCOOL13 opened 5 days ago

SEALCOOL13 commented 5 days ago

Selected all the non-custom options and tried to import but resulted in an error, the log of which is below:

2024-10-11 22:50:21.603 [INFO] [][01]: TraktRater v2.3.15.0
2024-10-11 22:50:21.655 [INFO] [][01]: Exchanging pin-code for access-token...
2024-10-11 22:50:21.686 [DEBG] [][19]: Address: https://api.trakt.tv/oauth/token, Post: {"client_id":"I_feel_this_is_sensitive_so_I'm_censoring_it_here_but_if_it's_required_please_tell_me","client_secret":"I_feel_this_is_sensitive_so_I'm_censoring_it_here_but_if_it's_required_please_tell_me","code":"I_feel_this_is_sensitive_so_I'm_censoring_it_here_but_if_it's_required_please_tell_me","grant_type":"authorization_code","redirect_uri":"urn:ietf:wg:oauth:2.0:oob"}
2024-10-11 22:50:23.251 [DEBG] [][19]: Response: {"access_token":"I_feel_this_is_sensitive_so_I'm_censoring_it_here_but_if_it's_required_please_tell_me","token_type":"Bearer","expires_in":7889237,"refresh_token":"I_feel_this_is_sensitive_so_I'm_censoring_it_here_but_if_it's_required_please_tell_me","scope":"public","created_at":1728669022}
2024-10-11 22:50:23.263 [INFO] [][01]: Starting import from Letterboxd
2024-10-11 22:50:23.268 [INFO] [][01]: Reading Letterboxd ratings export...
2024-10-11 22:50:23.270 [ERR ] [][01]: Letterboxd:Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=I_feel_this_is_sensitive_so_I'm_censoring_it_here_but_if_it's_required_please_tell_me' or one of its dependencies.
2024-10-11 22:50:28.270 [INFO] [][01]: Finished import from Letterboxd
2024-10-11 22:50:28.281 [INFO] [][01]: Import Complete!
damienhaynes commented 5 days ago

Hi @SEALCOOL13, thanks for reporting.

It appears there is a missing library you need, in particular: Microsoft.VisualBasic.dll. This file typically exists in: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Microsoft.VisualBasic.dll

Can you first confirm if you have this file? and if you do not please install the .NET Framework 4.8: https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net48-web-installer

Failing these options I will need to take a closer look.

SEALCOOL13 commented 4 days ago

I am using TraktRater on Linux Mint using Mono as you detailed in the setup guide.

The Mono installation, as far as I have tested (using the tests the Mono website provides) is working fine on my system.

The application launches fine, does everything fine except this error.

As I am on Linux, I could not search for the Microsoft.VisualBasic.dll file in the path you provided however I did find it under /run/host/usr/lib/mono/4.8-api/Microsoft.VisualBasic.dll.

Also thank you for replying promptly.

damienhaynes commented 4 days ago

Can you make sure Mono is referencing the correct version of Microsoft.VisualBasic.dll. You can use Mono’s gacutil to ensure the assembly is registered in Mono’s GAC: gacutil -l Microsoft.VisualBasic.

Failing that you can try copying the file the executable directory.

SEALCOOL13 commented 4 days ago

Nope... same error.

Not sure how I was meant to check if the assembly was registered but typing gacutil -l Microsoft.VisualBasic into the terminal gave the following output:

The following assemblies are installed into the GAC:
Number of items = 0

Also, I copied the Microsoft.VisualBasic.dll to the same directory as TraktRater.exe but even after completing both these steps, no success.

Any ideas?

SEALCOOL13 commented 2 days ago

Any updates?

damienhaynes commented 2 days ago

The fact that gacutil -l Microsoft.VisualBasic shows that no assemblies are installed in the GAC suggests that Mono is not properly referencing the Microsoft.VisualBasic.dll, which is likely causing the error.

A few things to try:

Check Mono’s Configuration Mono may be configured to use a different runtime version or a different set of libraries, which could be causing the issue. Target 4.x like so:

mono --runtime=v4.0 TraktRater.exe

Confirm the version of Microsoft.VisualBasic.dll is indeed 10.0.0.0. Use monodis:

monodis --assembly /run/host/usr/lib/mono/4.8-api/Microsoft.VisualBasic.dll

Another option which might provide more details is to run mono in debug mode (This will provide a log of which assemblies are being loaded, and whether any are failing):

mono --debug TraktRater.exe

Failing the above will possibly require dev work but not yet sure what.