Comments (3)
There's no way it wouldn't fail later in the process anyway, since the zip file is opened and info.json
is read before the zip gets saved.
Anyway, I added some proper error messages for both the "already logged in with no game ownership" and also added the require_ownership=true
parameter which the game uses on login. This is what it looks like now:
$ fac install yarm
Installing: YARM 0.7.107...
Downloading: https://mods.factorio.com/api/downloads/data/mods/187/YARM_0.7.107.zip...
Authentification error when downloading mod. Please login again.
You need a Factorio account to download mods.
Please provide your username and password to authenticate yourself.
Your username and token (NOT your password) will be stored so that you only have to enter it once
This uses the exact same method used by Factorio itself
Username [mickael9-test]:
Password (not shown):
Ownership error: Your factorio account doesn't own the game.
Please buy the game or link your Steam account if you have bought the game from Steam.
from fac.
You can use -v
for requests debugging :)
I'm not having this issue, I suspect the 403 error is because your token or username is invalid (from player-data.json
)
Are you able to download mods from the game?
Anyway, I'll add some error handling so that invalid error codes are raised as HTTPError
from fac.
See edit to the OP :)
Anyway, I'll add some error handling so that invalid error codes are raised as HTTPError
Yeah, that's what I was asking for. Otherwise there's the possibility a non-200 response has the same content length as the actual mod file, and fac install
won't notice.
from fac.
Related Issues (15)
- Enable (only) mods used by a savegame HOT 3
- Prefix Feature
- "SteamApps" directory in Linux is in lowercase
- [RFC] Things to include in a prefix PR
- Make compatible does not work
- Install deprecated mods
- Update PyPi release HOT 1
- Handle newlines in mod names in list and update
- Update loop stops on first held mod that is updatable HOT 2
- ProgressWidget.error() <newbie here>
- Unable to install mods with spaces in the name
- Unable to find write path HOT 4
- AttributeError: 'ZippedMod' object has no attribute 'factorio_version' HOT 3
- Suggestion for a modpack feauture HOT 2
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 fac.