feedme icon indicating copy to clipboard operation
feedme copied to clipboard

Issues running project and tests on Windows

Open denini08 opened this issue 3 months ago • 0 comments

Hi,

I was trying to run the project and the tests on Windows, and I noticed a few problems.

  1. When running the project, I got the following error:
Skipping item Traceback (most recent call last):
  File "/feedme/feedme.py", line 806, in get_feed
    if item_id in feedcachedict:
                  ^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'feedcachedict' where it is not associated with a value

This error also happened on macOS and Linux, so it seems to be cross-platform.

  1. Windows-specific issues

(a) File handling error

Renaming C:\Users\root\feeds\LOG to C:\Users\root\feeds\09-25-Thu\LOG
Couldn't move LOG or create MANIFEST:
[WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\root\\feeds\\LOG' -> 'C:\\Users\\root\\feeds\\09-25-Thu\\LOG'

This is because the file still open before move.

(b) Path handling error

[WinError 3] The system cannot find the path specified: 
'C:\\Users\\root\\feeds\\LOG' -> 'C:\\Users\\root\\feeds\\09-25-Thu\\LOG'
Cleaning up files older than 7 days from feed and cache dirs

This is because on Windows, we need to make the dir before

(c) Encoding issue in tests

test\test_feedme.py:79: in read_two_files
    newcontents = newfp.read()
...
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 14312: character maps to <undefined>

This seems related to default Windows encoding (cp1252) vs. UTF-8.

I’ll work on a fix for these issues and open a pull request soon.

denini08 avatar Sep 25 '25 23:09 denini08