Prototype Minster Music Software
Re: Prototype Minster Music Software
Hmmm. I only applied the whitespace fix because that was the only change that I saw when I clicked on your original link. Rather than test your merge, I simply added the fix to minstermusic.py on Music Pi itself. As it happens the same problem existed in html/statusmonitor.py so I fixed that too. That's all I did and it appeared to work; hence my confusion.
When I clicked on your second link I saw the other commits that you had made, which by and large I can understand. What benefit does pointing the MUSIC-C and WEBSERVER IP Address to local host instead of the proper IP Address have? Presumably they map to the same place?
Finally, when I'm happy about your merge request, I presume that I simply click 'Merge'? I presume that the checkbox 'Delete source branch' refers to the branch that contains the merge request, so it will no longer be a branch?
When I clicked on your second link I saw the other commits that you had made, which by and large I can understand. What benefit does pointing the MUSIC-C and WEBSERVER IP Address to local host instead of the proper IP Address have? Presumably they map to the same place?
Finally, when I'm happy about your merge request, I presume that I simply click 'Merge'? I presume that the checkbox 'Delete source branch' refers to the branch that contains the merge request, so it will no longer be a branch?
Terry
Re: Prototype Minster Music Software
They should do, but I thought that it works as a failsafe in case the IP changes, and makes it immediately clear to the reader that they're running on the same system. If you don't like that change, reverting it shouldn't be a problem.When I clicked on your second link I saw the other commits that you had made, which by and large I can understand. What benefit does pointing the MUSIC-C and WEBSERVER IP Address to local host instead of the proper IP Address have? Presumably they map to the same place?
Yeah, just click Merge, and tick "Delete source branch" - we won't need that any more once the changes are in master.
Hamish
Re: Prototype Minster Music Software
OK. Thanks. The rest of your changes appear to be fairly cosmetic, so I'm happy to merge them.
I'm still unsure why the whitespace error caused the connection problem.
I'm still unsure why the whitespace error caused the connection problem.
Terry
Re: Prototype Minster Music Software
I think it's probably the 127.0.0.1 change that fixed it, or the addition of "HostingSockets". It works for you too then?
Hamish
Re: Prototype Minster Music Software
It works for me, but I'd not done the other fixes; only the whitespace one.
Terry
Re: Prototype Minster Music Software
Well that's strange. If I think of anything I'll let you know.
Hamish
Re: Prototype Minster Music Software
Hamish,
I have another plea for help.
As you may have noticed from the LUG List, I've been having a few problems lately.
I've slowly been squashing the bugs as they revealed themselves and have managed to get the 'Stop Music' command from the Webserver Control Page working. However, when I try to 'Start Music' again, everything freezes up. I still have some ideas about how to pursue that problem but while I was doing that I realised that I ought to be logging errors if messages between the Pis were corrupted or whatever. I accordingly added an extra test in the message retrieving functions for this but have hit yet another problem. I've pushed the latest versions of each file to GitLab if you have time to look. (There is a string + literal concatenation error in minstermusic.py and I've been focusing on trying to get the code working in minsterbells.py.)
If you look at the check_minstermusic_commands() function in minsterbells.py (this function is called every second by apscheduler()), you will see that I have a bit of debugging code near the top:
Then at the bottom of the if ladder I have:
The problem that I have is that the variable 'data' which should be local gets filled with the contents of the message sent to the Music Pi and therefore gets trapped by my else. Since 'data' is supposed to be local and the only other variable that would contain that information is the List called 'Status', I'm assuming that the sockets message buffer retains that from the last time it was sent to the Music software. I have called socket.pop() to try to prevent that, but I can't see what else could be wrong.
I've also attached a copy of the console output when I ran this so you can see why I think what I do.
I have another plea for help.
As you may have noticed from the LUG List, I've been having a few problems lately.
I've slowly been squashing the bugs as they revealed themselves and have managed to get the 'Stop Music' command from the Webserver Control Page working. However, when I try to 'Start Music' again, everything freezes up. I still have some ideas about how to pursue that problem but while I was doing that I realised that I ought to be logging errors if messages between the Pis were corrupted or whatever. I accordingly added an extra test in the message retrieving functions for this but have hit yet another problem. I've pushed the latest versions of each file to GitLab if you have time to look. (There is a string + literal concatenation error in minstermusic.py and I've been focusing on trying to get the code working in minsterbells.py.)
If you look at the check_minstermusic_commands() function in minsterbells.py (this function is called every second by apscheduler()), you will see that I have a bit of debugging code near the top:
Code: Select all
def check_minstermusic_commands(): # Act upon commands from Minster Music Pi
global socket, Status
sched.pause_job(job_id='check_minstermusic_commands') # Suspend intil current job is complete
data = ""
if socket.has_data(): # Check for message
data = socket.read()
socket.pop() # Clear Message Buffer
print("") # For debugging purposes
print("Contents of data is ")
print(data)
print("")
if "Status" in data: # Status request from Music Pi Received
print("Bells Pi Status Request Received")
etc...
Code: Select all
else:
print("Error: Unexpected Message Received from Music Pi: ")
print(data)
logger.critical("Error: Unexpected Message Received from Music Pi: ")
logger.critical(data)
I've also attached a copy of the console output when I ran this so you can see why I think what I do.
- Attachments
-
- BellsPi_Console_OP.txt
- (2.36 KiB) Downloaded 59 times
Terry
Re: Prototype Minster Music Software
Just letting you know I've seen this. Is this related to the recent query on the LUG?
Hamish
Re: Prototype Minster Music Software
Only peripherally. This problem doesn't seem to stop the code working but I'd like to know why there is an apparently erroneous command being sent.
Terry
Re: Prototype Minster Music Software
All right, I'll have a look when I have some time - hopefully soon.
Hamish