Giter Site home page Giter Site logo

Doesn't start about ivpt HOT 24 OPEN

mb6ockatf avatar mb6ockatf commented on June 12, 2024
Doesn't start

from ivpt.

Comments (24)

mb6ockatf avatar mb6ockatf commented on June 12, 2024 2

I just recently reinstalled Windows and it seems to me that this program worked for me before

this explains everything

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024 2

By the way, on Ubuntu this program works🤔

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

@IvanIsak2000 pattern matching was added to python in 3.10. my python version is written in runtime.txt

it can be easilly substituted with if/else statements; you can make a PR for this us you're interested

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

@IvanIsak2000 it seems you have a newer python version on your ubuntu system

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

I have not yet tested the program on Linux

my apologies;
but you made these screenshots in README.md, and seems it was working fine

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

@IvanIsak2000 i use arch btw

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

Weird, I installed Python 3.10.6 and another problem appeared
image

image

can you try this on a linux system? i'm currently a bit busy with other stuff, and windows machine is far away - i cannot rest it myself rn

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

@IvanIsak2000 works perfectly for me:

shit

$ python --version
Python 3.11.1

can you provide more information about the error, please?

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024 1

I will test again.
At the moment (3.10.6 python) it looks like this:
image

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024 1

On Python 3.11.3:

image

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024 1

maybe doesn't work because Windows can't handle double backslashes
image

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

well, that's weird. I have checked everything, there's no double forward slash
@IvanIsak2000 can you show me the output of

import os
print(os.sep)

on that windows system?

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024 1

well, that's weird. I have checked everything, there's no double forward slash
@IvanIsak2000 can you show me the output of

import os
print(os.sep)

on that windows system?

I did
Result :
\

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

@IvanIsak2000 i really do not know what to do. the only thing left - delete ~/.IVPT folder and try one more time.
Thank you for all your tests, but unfortunately, i cannot reproduce this thing. You may try to fix it yourself, it has something to deal with src/essential/config.py. That file is needed to read and create-if-not-exist (aka linux touch command) configuration file in ~/.IVPT/config.toml

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

i doubt stdlib modules can misbehave. Anyway, if you want to statically set your paths, you need to correct config.py (see comments below):

...
def configuration() -> dict:
    # build user config path with default path separator os.path
    config_path = os.sep.join([os.path.expanduser("~"), ".IVPT", "config.toml"])
    config = None
    # build default config path with default path separator os.path
    default_config = os.sep.join(["src", "essential", "default_config.toml"])
    path_items_list = list(config_path.split(os.sep))[1:]
    # make all the directories needed for files creation (here, os.path is used once again)
    for index in range(len(path_items_list)):
        cur_dir = os.sep + os.sep.join(path_items_list[0: index])
        if not os.path.isdir(cur_dir):
            os.mkdir(cur_dir)
    # create file if not exists, and fill with default contents
    if not os.path.isfile(config_path):
        with open(default_config, "r", encoding="utf-8") as output_file:
            contents = output_file.read()
        with open(config_path, "w", encoding="utf-8") as input_file:
            input_file.write(contents)
    # load configuration
    try:
        with open(config_path, "rb") as file:
            toml_dict = load(file)
            config = toml_dict
    except ...  # handle exceptions

so there're 2 files:
src/essential/default_config.toml
and
~/.IVPT/config.toml

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024 1

i'll try it myself, too - as soon as i find windows pc

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024

I have not yet tested the program on Linux

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024

I just recently reinstalled Windows and it seems to me that this program worked for me before

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024

Weird, I installed Python 3.10.6 and another problem appeared
image

image

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024

On Ubuntu
image

It is strange that it does not work on Ubuntu either, although nothing was reinstalled from the installation
image

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024

@IvanIsak2000 i really do not know what to do. the only thing left - delete ~/.IVPT folder and try one more time.
Thank you for all your tests, but unfortunately, i cannot reproduce this thing. You may try to fix it yourself, it has something to deal with src/essential/config.py. That file is needed to read and create-if-not-exist (aka linux touch command) configuration file in ~/.IVPT/config.toml

Can you write a tree of all folders/files so that I can skip defining the paths and populate them myself?

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024

@IvanIsak2000 i really do not know what to do. the only thing left - delete ~/.IVPT folder and try one more time.
Thank you for all your tests, but unfortunately, i cannot reproduce this thing. You may try to fix it yourself, it has something to deal with src/essential/config.py. That file is needed to read and create-if-not-exist (aka linux touch command) configuration file in ~/.IVPT/config.toml

Can you write a tree of all folders/files so that I can skip defining the paths and populate them myself?

sorry, what do you mean?

from ivpt.

IvanIsak2000 avatar IvanIsak2000 commented on June 12, 2024

@IvanIsak2000 i really do not know what to do. the only thing left - delete ~/.IVPT folder and try one more time.
Thank you for all your tests, but unfortunately, i cannot reproduce this thing. You may try to fix it yourself, it has something to deal with src/essential/config.py. That file is needed to read and create-if-not-exist (aka linux touch command) configuration file in ~/.IVPT/config.toml

Can you write a tree of all folders/files so that I can skip defining the paths and populate them myself?

sorry, what do you mean?

I saw that the paths for files are calculated using libraries, but since they do not work correctly, I can specify the path myself

from ivpt.

mb6ockatf avatar mb6ockatf commented on June 12, 2024

@IvanIsak2000 so, a year have passed. i tried on windows, everything works smoothly. does it still fails for you?

from ivpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.