HelloZeroNet / HelloZeroNet/ZeroNet
should zeronet.conf need to have all the configuration as shared in the example ?
- Langage dominant
- JavaScript
- Étoiles
- 18.8k
- Forks
- 2.3k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### Step 1: Please describe your environment
* ZeroNet version: 0.6.1 r3234
* Operating system: Debian buster
* Web browser: 52.6.0
* Tor status: always
* Opened port: no
* Special configuration: in /etc/tor
```
ControlPort 9051
CookieAuthentication 1
```
from https://zeronet.readthedocs.io/en/latest/faq/#how-to-make-zeronet-work-with-tor-under-linux
### Step 2: Describe the problem:
I just want to have the log directory in a separate directory not anything else.
See https://zeronet.readthedocs.io/en/latest/faq/#is-it-possible-to-use-a-configuration-file
I want/ed to do -
You can put your configuration options to a zeronet.conf file. Example:
```
[global]
log_dir = ~/log/
```
I get the following error message -
```
- Starting ZeroNet...
ERROR:root:Unhandled exception: [Errno 2] No such file or directory: '~/log/'
Traceback (most recent call last):
File "zeronet.py", line 18, in main
import main
File "/home/shirish/games/ZeroNet-master/src/main.py", line 32, in
os.mkdir(config.log_dir)
OSError: [Errno 2] No such file or directory: '~/log/'
Traceback (most recent call last):
File "zeronet.py", line 91, in
main()
File "zeronet.py", line 64, in main
traceback.print_exc(file=open(config.log_dir + "/error.log", "a"))
AttributeError: 'Config' object has no attribute 'log_dir'
```
This is when I have made -
```
/home/shirish/games/ZeroNet-master> ls -l | grep log
drwxr-xr-x 2 shirish shirish 4096 Jan 31 12:58 log
```
I have tried it both with zeronet-stable 0.6.1 and zeronet-master and got the same error message.
I am happy with all the other defaults hence don't want to change anything and don't even know why I need to change the other options such as data-dir and UI-restrict bits. There is simply no explanation of what those options do.
* What did you expect to happen?
I expected it to run without issues as I have given the path. I actually expected to make the log directory when it was not there but didn't and had to create it manually.
I did read https://github.com/HelloZeroNet/ZeroNet/issues/1192 to see if I could get more input or understanding but didn't.
At the end had to remove zeronet.conf to access zeronet.py via python otherwise it was not happening.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start with zeronet.py and src/main.py, especially the startup path shown in the traceback, and reproduce the failure using a zeronet.conf containing [global] log_dir = ~/log/. Check the FAQ configuration example and the reported default-handling concern; done means ZeroNet starts with that configuration and uses the requested log directory without the secondary Config error.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- cli
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100