Comments (6)
I saw there was an exact same issue, but it had been marked as invalid and closed.
https://github.com/Avnsx/fansly/issues/55
from fansly-downloader.
Slightly change the auth token in your config.ini file and paste the whole config.ini file here
from fansly-downloader.
Slightly change the auth token in your config.ini file and paste the whole config.ini file here
Here you go. I have changed the token
[TargetedCreator]
username = CreatorName
[MyAccount]
authorization_token = NTExMzEyMDI0MzU4MTAwOTkyOjE6Mjo5NzY123Q3NTcxZjg2MmY3ZGM1OTNiMTZmNmQzZDU
user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
[Options]
show_downloads = False
download_media_previews = True
update_recent_download = Auto
open_folder_when_finished = True
naming_convention = Date_posted
seperate_messages = False
seperate_previews = False
download_directory = Local_directory
[Other]
version = 0.3.6
from fansly-downloader.
SyntaxError: invalid syntax
So considering this is a SyntaxError, it must be an issue with your environment not supporting the way the output function is structured. Specifically the f-strings (formatted string literals).
So the python code snippet I linked right below, contains two versions of the line of code that caused this error for you. Please create a new python script, paste below snippet into it and run it, then let me know the result and the version of python that you're using to produce it.
import sys
from loguru import logger as log
from functools import partialmethod
def output(level, type, color, mytext):
try:log.level(type, no=level, color=color)
except TypeError:pass # level failsave
log.__class__.type = partialmethod(log.__class__.log, type)
log.remove()
log.add(sys.stdout, format="<level>{level}</level> | <white>{time:HH:mm}</white> <level>|</level><light-white>| {message}</light-white>", level=type)
log.type(mytext)
e = 'test'
# does this NOT cause a syntax error? (no additonal " around the f-string)
output(2,'\n [2]ERROR','<red>', f'{e} is missing or malformed in the configuration file!\n{21*" "}Read the Wiki > Explanation of provided programs & their functionality > config.ini')
# does this cause the syntax error? (added additional ")
output(2,'\n [2]ERROR','<red>', f'"{e}" is missing or malformed in the configuration file!\n{21*" "}Read the Wiki > Explanation of provided programs & their functionality > config.ini')
I saw there was an exact same issue, but it had been marked as invalid and closed. #55
The error you're having is not the exact same one as the guys. The guy in there modified the output function, but because of lacking programming skills he didn't understand that the function takes 4 arguments output(level, type, color, mytext)
but he only passed 3 arguments, leaving out type
.
But now that you pointed it out I wonder, if he maybe didn't modify the code himself, but his environment wasn't able to execute the function argument type
as such, since type
is also a built-in python function, maybe I should choose a different variable name that is not going to conflict with built-in names, as that might lead to unexpected errors.
So to test that also, try running this snippet below:
import sys
from loguru import logger as log
from functools import partialmethod
# renamed func argument from "type" to "log_type"
def output(level, log_type, color, mytext):
try:log.level(log_type, no=level, color=color)
except TypeError:pass # level failsave
log.__class__.type = partialmethod(log.__class__.log, log_type)
log.remove()
log.add(sys.stdout, format="<level>{level}</level> | <white>{time:HH:mm}</white> <level>|</level><light-white>| {message}</light-white>", level=log_type)
log.type(mytext)
e = 'test'
# does this NOT cause a syntax error? (removed newline backslash in type arg)
output(2,'[2]ERROR','<red>', f'{e} is missing or malformed in the configuration file!\n{21*" "}Read the Wiki > Explanation of provided programs & their functionality > config.ini')
# does this cause the syntax error? (keeping newline backslash in type arg)
output(2,'\n [2]ERROR','<red>', f'"{e}" is missing or malformed in the configuration file!\n{21*" "}Read the Wiki > Explanation of provided programs & their functionality > config.ini')
I myself for example can execute all of these without any errors, it might be different for you though, which is why I want you to test both of these snippets and report back to me :)
from fansly-downloader.
@samja666 Hey could you report back please? I want to include a fix for this in the next compiled version already
from fansly-downloader.
Regardless of you not responding anymore, I am pretty sure this issue was related to not escaping apostrophes in prints.
Should be fixed with 8c591cb
Will release that 0.4 version as compiled executable within a couple days, once people start providing some feedback.
from fansly-downloader.
Related Issues (20)
- download_directory parsing from config.ini breaks on case-sensitive filesystems HOT 1
- 'Connection aborted' while downloading m3u8 file HOT 3
- "updatedAt" causing unhandled TypeError exception HOT 1
- Downloader is failing, due to recent Rate Limiting update by Fansly HOT 26
- scraping almost nothing? HOT 4
- macOS 13.1 : pyexiv2 only supports these Python versions: ['3.5', '3.6', '3.7', '3.8', '3.9'] HOT 3
- Problem with downloading m3u8 videos HOT 4
- Set of Images (single post) Download Issue HOT 2
- Error 19 when downloading videos_m3u8 HOT 7
- Unexpected Error during Sorting HOT 3
- Not able to install requirements (using master one) HOT 3
- [Errno 22] Application provided invalid, non monotonically increasing dts to muxer in stream 1
- Set max video resolution in config before scrapping and downloading
- Unexpected "Traceback" error during sorting Timeline download HOT 1
- Is this program dead? HOT 3
- Tuple Index Out Of Range with Windows Executable HOT 4
- Images Date/Time Exif Field is sometimes populated with incorrect value HOT 4
- Downloader is missing images from Posts HOT 4
- Didnt Download All The Images On The Post HOT 6
- download directory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fansly-downloader.