Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: Unable to sync files with # in the name #8

Closed
cp2004 opened this issue Jan 8, 2023 · 1 comment
Closed

[Bug]: Unable to sync files with # in the name #8

cp2004 opened this issue Jan 8, 2023 · 1 comment
Labels
confirmed bug Bug reproduced and needs to be fixed solved Solved, but not yet released.

Comments

@cp2004
Copy link
Owner

cp2004 commented Jan 8, 2023

Description of the bug

Seems this character is not being encoded properly - need to check the MS Graph API docs, and then potentially patch octo-onedrive.

Plugin version

1.0.3

OctoPrint version

1.9.0dev

OctoPrint logs

2023-01-08 18:49:36,912 - octoprint.plugins.onedrive_files.sync - DEBUG - Sync run finished in 0.61 seconds, next run in maximum of 10 seconds
2023-01-08 18:49:46,919 - octoprint.plugins.onedrive_files.sync - DEBUG - Starting sync run, mode: onedrive
2023-01-08 18:49:47,354 - octoprint.plugins.onedrive_files.sync - DEBUG - Sync comparison complete
2023-01-08 18:49:47,354 - octoprint.plugins.onedrive_files.sync - DEBUG - Sync actions:
2023-01-08 18:49:47,354 - octoprint.plugins.onedrive_files.sync - DEBUG - [{'action': 'download', 'file': '/G2 Arc test (#4580).gcode'}, {'action': 'download', 'file': '/Hairy_Lion #1.gcode'}]
2023-01-08 18:49:47,354 - octoprint.plugins.onedrive_files.sync - DEBUG - Downloading file from OneDrive: /G2 Arc test (#4580).gcode
2023-01-08 18:49:47,594 - octo_onedrive.OneDriveComm - ERROR - 404 Client Error: Not Found for url: https://graph.microsoft.com/v1.0/me/drive/items/D4CE5C88FADEF65F!339384:/G2%20Arc%20test%20(#4580).gcode
Traceback (most recent call last):
  File "c:\users\charl\development\pythonpackages\octo-onedrive\src\octo_onedrive\onedrive.py", line 462, in _check_status
    response.raise_for_status()
  File "C:\Users\charl\Development\venv310\lib\site-packages\requests\models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://graph.microsoft.com/v1.0/me/drive/items/D4CE5C88FADEF65F!339384:/G2%20Arc%20test%20(#4580).gcode
2023-01-08 18:49:47,594 - octoprint.plugins.onedrive_files.sync - ERROR - Error fetching file data, skipping ({'code': 'itemNotFound', 'message': 'Item does not exist', 'innerError': {'date': '2023-01-08T18:49:47', 'request-id': '0e2c5fe1-790d-4505-bdbf-777c75a8d0d1', 'client-request-id': '0e2c5fe1-790d-4505-bdbf-777c75a8d0d1'}})
2023-01-08 18:49:47,594 - octoprint.plugins.onedrive_files.sync - DEBUG - Downloading file from OneDrive: /Hairy_Lion #1.gcode
2023-01-08 18:49:47,750 - octo_onedrive.OneDriveComm - ERROR - 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/me/drive/items/D4CE5C88FADEF65F!339384:/Hairy_Lion%20#1.gcode
Traceback (most recent call last):
  File "c:\users\charl\development\pythonpackages\octo-onedrive\src\octo_onedrive\onedrive.py", line 462, in _check_status
    response.raise_for_status()
  File "C:\Users\charl\Development\venv310\lib\site-packages\requests\models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/me/drive/items/D4CE5C88FADEF65F!339384:/Hairy_Lion%20#1.gcode
2023-01-08 18:49:47,751 - octoprint.plugins.onedrive_files.sync - ERROR - Error fetching file data, skipping ({'code': 'invalidRequest', 'message': 'Path (/Hairy_Lion ) contains invalid trailing character.', 'innerError': {'code': 'nameContainsInvalidCharacters', 'date': '2023-01-08T18:49:47', 'request-id': 'bbe60e23-b816-4251-b406-5e690ea37611', 'client-request-id': 'bbe60e23-b816-4251-b406-5e690ea37611'}})
2023-01-08 18:49:47,751 - octoprint.plugins.onedrive_files.sync - DEBUG - Sync run finished in 0.83 seconds, next run in maximum of 10 seconds
@cp2004 cp2004 added bug confirmed bug Bug reproduced and needs to be fixed and removed bug labels Jan 9, 2023
cp2004 added a commit to cp2004/Octo-OneDrive that referenced this issue Jan 9, 2023
@cp2004 cp2004 added the solved Solved, but not yet released. label Jan 9, 2023
@cp2004
Copy link
Owner Author

cp2004 commented Jan 9, 2023

1.0.4 has been released, fixing a number of issues including this one.

@cp2004 cp2004 closed this as completed Jan 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
confirmed bug Bug reproduced and needs to be fixed solved Solved, but not yet released.
Projects
None yet
Development

No branches or pull requests

1 participant