ReZeroE / StarRail

Honkai: Star Rail Automation Package
MIT License
278 stars 27 forks source link

Import Error: attempted relative import with no known parent package #1

Closed skzidan closed 1 year ago

skzidan commented 1 year ago

image

py --version Python 3.11.3

ReZeroE commented 1 year ago

Hi there,

The starrail package is a Python module (AKA library) that needs to be pip installed in order to work correctly. It does not work the same way as a standalone script (where you called py honkai_star_rail.py).

I haven't written any documentation for this module because it's still in the early stages of development. The current features offered by starrail are relatively simple and somewhat unstable.

With that being said, here is how you install and run it:


To Install run:

pip install starrail

OR

git clone https://github.com/ReZeroE/StarRail.git
cd StarRail
pip install .

After the installation is complete, run the following to configure the module:

starrail configure

then follow the prompted steps to configure the module.


Currently, there are only a few basic command-line features implemented (the starrail UI is still in development):

  1. Starting the game from the command-line:
    starrail start
  2. Terminating the game from command-line (started with starrail start)
    starrail stop
  3. Show configuration status
    starrail show-config
  4. Set path to game in module (overwrite previous path)
    starrail set-path
skzidan commented 1 year ago

image same thing also got from starrail configure command . Already did pip install starrail

ReZeroE commented 1 year ago

Did you make sure that starrail was successfully pip installed?

If so, try:

pip uninstall starrail
pip install starrail==0.0.3
pip show starrail

If you could show me the ending output from pip show starrail that would help a lot.

skzidan commented 1 year ago

image Now it works !! u didnt add automation feature yet am I right?

ReZeroE commented 1 year ago

Great! And yes, I'm still in the process of implementing the user interface and the automation features.