FieldStation42: Bumps causing crash
I am not sure if this is related to #160, as that was what I was following and thinking was the issue. It appears, when attempting to play a .mp4 bump, I am getting a crash. I have to alt + f4 to get back to desktop environment. This is the output in the cmd:
2025-05-23 13:52:36,039 INFO:FieldPlayer:Playing entry PlanEntry: catalog/ToonSpree_catalog/bump/post/back_long_bump.mp4 skip=0 duration=10.079773
2025-05-23 13:52:36,039 INFO:FieldPlayer:Initial Skip: 0
Traceback (most recent call last):
File "/home/brandon/FieldStation42/field_player.py", line 217, in <module>
main_loop(trans_fn)
File "/home/brandon/FieldStation42/field_player.py", line 77, in main_loop
outcome = player.play_slot(channel_conf['network_name'],datetime.datetime.now())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brandon/FieldStation42/fs42/station_player.py", line 140, in play_slot
return self._play_from_point(play_point)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brandon/FieldStation42/fs42/station_player.py", line 153, in _play_from_point
self.play_file(entry.path)
File "/home/brandon/FieldStation42/fs42/station_player.py", line 100, in play_file
self.mpv.play(file_path)
File "/home/brandon/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 617, in play
self.loadfile(url)
File "/home/brandon/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 607, in wrapper
return self.command(name, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brandon/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 640, in command
return self.mpv_inter.command(command, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brandon/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 335, in command
self.socket.send({"command":command_list, "request_id": command_id})
File "/home/brandon/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 164, in send
self.socket.send(json.dumps(data).encode('utf-8') + b'\n')
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type PosixPath is not JSON serializable
I also attempted to start with this command:
python3 field_player.py -v -l mylog.txt
But I could not find a mylog.txt created anywhere. I just got this up and running today, but from what I can tell I have followed everything correctly. The .json files are correct and schedules seem correct. I have included the .json conf file for this channel.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 23 (12 by maintainers)
@xwcg - I would like to split your issue out since I think it is separate. I have created new issue #171 - if you can follow that ticket, I have a question and some suggestions.
FYI Dunno if this belongs here but it seems adjacent, it sometimes seems to get the wrong duration for shows:
2025-05-23 22:47:32,512 INFO:MainLoop:Playing station: SaiFai 2025-05-23 22:47:32,517 INFO:MainLoop:Starting station SaiFai at: friday 22 skipping=2852 2025-05-23 22:47:32,628 INFO:FieldPlayer:Playing entry PlanEntry: catalog/saifai/series/Babylon 5/S01E15 - Grail.avi skip=559.3333333333334 duration=279.6666666666667 2025-05-23 22:47:32,629 INFO:FieldPlayer:Initial Skip: 259.66416 Traceback (most recent call last): File "/home/fieldstation/FieldStation42/field_player.py", line 217, in <module> main_loop(trans_fn) File "/home/fieldstation/FieldStation42/field_player.py", line 77, in main_loop outcome = player.play_slot(channel_conf['network_name'],datetime.datetime.now()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fieldstation/FieldStation42/fs42/station_player.py", line 140, in play_slot return self._play_from_point(play_point) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fieldstation/FieldStation42/fs42/station_player.py", line 153, in _play_from_point self.play_file(entry.path) File "/home/fieldstation/FieldStation42/fs42/station_player.py", line 100, in play_file self.mpv.play(file_path) File "/home/fieldstation/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 617, in play self.loadfile(url) File "/home/fieldstation/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 607, in wrapper return self.command(name, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fieldstation/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 640, in command return self.mpv_inter.command(command, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fieldstation/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 335, in command self.socket.send({"command":command_list, "request_id": command_id}) File "/home/fieldstation/FieldStation42/env/lib/python3.11/site-packages/python_mpv_jsonipc.py", line 164, in send self.socket.send(json.dumps(data).encode('utf-8') + b'\n') ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps return _default_encoder.encode(obj) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/encoder.py", line 200, in encode chunks = self.iterencode(o, _one_shot=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode return _iterencode(o, 0) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/encoder.py", line 180, in default raise TypeError(f'Object of type {o.__class__.__name__} ' TypeError: Object of type PosixPath is not JSON serializable