nsapa / fanfictionnet_ff_proxy

fanfictionnet_ff_proxy: an experimental "proxy" for fanfiction.net piloted by FanFicFare
CeCILL Free Software License Agreement v2.1
22 stars 3 forks source link

How to make this work? #4

Closed LoisGNS closed 2 years ago

LoisGNS commented 3 years ago

Are are more complete docs somewhere? I downloaded the zip file, unzipped it into a subfolder of my Pythone37 folder. Since my Python executable is python37.exe, I typed "python37 c:\python37[subfolder]\chrome_content.py" to run it. It produces the error message "no module named 'colorama'". I also tried putting the .py file directly into my Python37 folder, and calling it more directly, but get the same error message. Obviously I'm missing something or other, and am admittedly not at all experienced with Python, so have no clue what the problem could be. I've looked at the Readme and requirements.txt; the document in the Docs folder appears Mac-specific, and I'm wondering if this is even meant to work under Windows.

nsapa commented 3 years ago

Hello,

Yes, I need to write the Windows documentation. Does this video help you ?

Best regards, NS

LoisGNS commented 3 years ago

Well, up to a point. I got through installing the proxy, but it wouldn't run. Here is the error message: File "chrome_content.py" line 356 name "argparse" is not defined I never got the chrome window shown on your video. I did check my Chrome version & it matches yours. I also authorized Python in the firewall (the method you showed wasn't applicable to my system, so I used the method that is applicable to set an "inbound rule" and an "outbound rule" permitting my Python 37 executable to go through both ways. Reran the command to start the proxy - no change in the error message. At this point I stopped, keeping my current version of the FFFare plugin, since it is working with the browser-cache workaround (not ideal, obviously).

nsapa commented 3 years ago

argparse is imported at line 4 and is part of Python since 3.2.

I believe your python installation is broken in some way. Are you using the official python from python.org?

EDIT: also line 356 is currently empty. Did you download the zip generated by github?

LoisGNS commented 3 years ago

I assume I got my Python from python.org - it was a few months ago, so can't be absolutely sure, and am not sure where I could look to double-check. It looks like I also downloaded 3.9 at the same time. I don't recall why I installed 3.7 rather than 3.9. It may have had something to do with compatibility with something or other, but I didn't make a note.

I ran a search on my python37 folder and found references to argparse as follows:

image

It doesn't choke on the import line, but much later: Here is the exact error message:

Traceback (most recent call last): File ".\ff_proxy\chrome_content.py", line 356, in

NameError: name 'argparse' is not defined.

Looking at the source with Notepad++, line 356 is indeed blank; The following two lines - which I'm guessing is the source of the error report, are: if name == "main": p = argparse.ArgumentParser()

Yes, I downloaded the zip from Github: fanfictionnet_ff_proxy-master.zip (about 9K bytes)

In case path matters, as I have a Python27 installation which was referenced earlier in the Path statement than Python 37. I edited my path to change the order, closed and reopened my DOS (console) window to verify the change, but got the same error, so Path isn't the issue.

mcepl commented 3 years ago

If you run at the command line (cmd.exe or however it is called in Windows these days): python3 (or python37 or whatever you need to get a Python prompt) and then import argparse, you need to have prompt back without an error. If you don't, your installation of Python is severely corrupt.

LoisGNS commented 3 years ago

"import argparse" gives me a prompt back with no error, so no evidence there for a corrupt installation. That is, my Python37 installation seems ok with argparse but when I run chrome_content.py it produces the same error I previously reported.

nsapa commented 3 years ago

Hi,

I never asked but what is your Windows version ( 7 32bits, 7 64bits, 8 32bits, 8 64bits, 8.1 32bits, 8.1 64 bits, 10 32bits, 10 64bits, 11 64bits)?

Best regards, NS

nsapa commented 3 years ago

Hi,

If you're running Windows 10 64bits, could you download this archive, extract it somewhere and start chrome_content.exe? I used cx_Freeze on a Windows 10 64bits to package the proxy in version 0.5.4 with python 3.9.4.

Best regards, NS

LoisGNS commented 3 years ago

I'm running Windows 7 64 bit.