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

Can't read json and error with argument #128

Open
Taikeur opened this issue Aug 17, 2018 · 7 comments
Open

Can't read json and error with argument #128

Taikeur opened this issue Aug 17, 2018 · 7 comments
Assignees
Labels

Comments

@Taikeur
Copy link

Taikeur commented Aug 17, 2018

Hello,

I've tried to reinstall TraktForVLC 2.0 on my xubuntu laptop but I have errors in the logs.

The installation goes well, no problems.

First, when i start vlc:

[0000559a6cc18950] [trakt] lua interface error: (file.get_json) JSON file not in the right format
[0000559a6cc18950] [trakt] lua interface: TraktForVLC 2.0.0a2 - Lua implementation
[0000559a6cc18950] [trakt] lua interface: helper: /home/taker/.local/share/vlc/lua/trakt_helper
[0000559a6cb394e0] main playlist: playlist is empty
[0000559a6cc18950] [trakt] lua interface error: 
	############################
	TraktForVLC is not setup with Trakt.tv yet!
	--
	PLEASE GO TO https://trakt.tv/activate
	AND ENTER THE FOLLOWING CODE:
	XXXXXXX
	############################

From what i understand he can't access the json file where are the parameters, so he's asking me every time i launch vlc to setup TraktForVLC on Trakt

I've tried to completely delete TraktForVLC and VLC, and the config file to see, same problem.

Then I've got this error:

[000055d115eb2850] [trakt] lua interface: The.Handmaids.Tale.S02E10.VOSTFR.720p.WEB-DL.H.264.mkv is playing! :) (2,478373/3312,513024)
[000055d115eb2850] [trakt] lua interface error: (call_helper) Command: "/home/taker/.local/share/vlc/lua/trakt_helper" "--quiet" "resolve" "--meta" "{\"NUMBER_OF_BYTES\":\"11280\",\"seasonNumber\":\"02\",\"_STATISTICS_WRITING_DATE_UTC\":\"2018-06-21 10:38:50\",\"DURATION\":\"00:54:59.547000000\",\"_STATISTICS_WRITING_APP\":\"mkvmerge v7.8.0 ('River Man') 64bit built on Mar 28 2015 07:20:28\",\"filename\":\"The.Handmaids.Tale.S02E10.VOSTFR.720p.WEB-DL.H.264.mkv\",\"episodeNumber\":\"10\",\"title\":\"The Handmaids Tale S02E10\",\"showName\":\"The Handmaids Tale\",\"BPS\":\"27\",\"NUMBER_OF_FRAMES\":\"434\",\"_STATISTICS_TAGS\":\"BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES\"}" "--duration" "3312,513024" "--hash" "31c7fc47fd98dc78" "--size" "638128498" 2>&1
[000055d115eb2850] [trakt] lua interface error: (call_helper) Unable to parse json
[000055d115eb2850] [trakt] lua interface error: (call_helper) Command output: usage: trakt_helper resolve [-h] [--meta META] [--hash OSHASH] [--size SIZE]
                            [--duration DURATION]
trakt_helper resolve: error: argument --duration: invalid float value: '3312,513024'

If anyone has any idea how to fix these problem, I will be really grateful.

Edit: Here's my config file:

{
  "media":{
    "start":{
      "time":30,
      "movie":true,
      "percent":0.25,
      "episode":true
    },
    "stop":{
      "movie":true,
      "episode":true,
      "check_unprocessed_delay":120,
      "percent":90,
      "watched_percent":50
    },
    "info":{
      "max_try":10,
      "try_delay_factor":30
    }
  },
  "helper":{
    "update":{
      "release_type":"stable",
      "action":"install",
      "check_delay":86400
    },
    "mode":"standalone",
    "service":{
      "port":1984,
      "host":"localhost"
    }
  },
  "cache":{
    "delay":{
      "cleanup":60,
      "save":30,
      "expire":2592000
    }
  },
  "auth":{
    "access_token":"token",
    "refresh_token":"token"
  },
  "config_version":"2.0.0a2"
}
@XaF
Copy link
Owner

XaF commented Aug 17, 2018

Can you please provide me with your config file? (remove anything that's identifiable)

For the last part, your duration is shown as "dddd, ddd" instead of "dddd.ddd" - what is your locale?

@Taikeur
Copy link
Author

Taikeur commented Aug 17, 2018

I've just added my config file to my first post.

My locale is fr_FR

@XaF
Copy link
Owner

XaF commented Aug 17, 2018

I'm wondering if VLC's loaded lua is dependent on the locale for the number.
With a french locale, the numbers are separated with a comma for the floating point, while it's a dot in english locales. The configuration file contains 0.25, which lua might have troubles to load if it's looking for a comma... even though that'd be weird given that a comma is already a special symbol in JSON. Could you try removing the line with the "percent": 0.25 ? (it would get recreated at the next run, but I'd like to know if it is actually that line that's the issue)

However, this confirms that the other issue is linked to the locale, I'll have to investigate how to solve that issue.

@XaF XaF added the bug label Aug 17, 2018
@XaF XaF self-assigned this Aug 17, 2018
@Taikeur
Copy link
Author

Taikeur commented Aug 17, 2018

Thanks ! I've removed the line and I no longer have the error when I start VLC. He doesn't ask me to setup TraktToVLC anymore.

@XaF
Copy link
Owner

XaF commented Aug 17, 2018

So that's definitely a locale issue, and you might end-up with the issue again next time you start it. I'll try to investigate how to reproduce and fix the issue...
Also, you might end-up with the exact same issue for the cache used to know what you saw and remember the IMDb information. Could you try installing an english version of VLC ? Or change your locale to run VLC ? (Might be a temporary solution...)

@Taikeur
Copy link
Author

Taikeur commented Aug 17, 2018

When i run VLC in English I have the same error in the logs.

But when I change my computer's locales to en, everything works !

FYI: the line "percent": 0.25 is not "reinstalled" when I restart VLC.

@icapan
Copy link

icapan commented Jan 5, 2019

Hello, I have the same issue.
When I deleted the "percent" line from config, nothing happened, still errors. But it does not recreate.
When I do "export LC_ALL=en_US.UTF-8" and start vlc from the command line, then it works. But it is highly impractical, so please, try to fix it.
There is no english version of vlc, I download it via package manager "vlc 3.0.4-1ubuntu0.2".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants