Python AH Buyer / Seller / ffxiah.com scrubber

Applications/Tools written to make running DarkStar easier for the rest of us.
Post Reply
User avatar
Aale
Posts: 22
Joined: Thu Aug 07, 2014 1:08 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Aale » Mon Jun 29, 2015 10:00 am

Can anyone post a current tut for this? The readme and the makebin.py coding don't seem to match the files I get when I clone the repository. (Makebin.py errors out looking for a few folders when following the posted instructions)

Lucious_Llama
Posts: 40
Joined: Mon Jul 28, 2014 5:22 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Lucious_Llama » Mon Jun 29, 2015 10:33 am

That was my fault, I was making some changes and published them too early. I've moved those changes into a development branch and reverted the code back to a working state. Please reclone the repository to make things work again.

User avatar
Aale
Posts: 22
Joined: Thu Aug 07, 2014 1:08 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Aale » Mon Jun 29, 2015 10:42 am

Thanks, will do so when I get home from work.

User avatar
Aale
Posts: 22
Joined: Thu Aug 07, 2014 1:08 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Aale » Tue Jun 30, 2015 1:39 am

Works perfectly, thanks for all the hard work on this!

Crosine
Posts: 49
Joined: Wed Sep 10, 2014 9:32 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Crosine » Wed Jul 29, 2015 10:55 pm

I seem to be running into some issues trying to set this up, hoping someone will be able to give me some more insight as to what I may be doing wrong or if it is a glitch in the code that I am over looking. I started off trying to follow the README.md file located on the pull site located here: https://github.com/AdamGagorik/pydarkstar. Everything goes fine up until I need to create the .bat scripts to scrub and run the broker. When specifying the correct pathways to the files and running the script it keeps returning an import error: pydarkstar.logutils does not exist. However inside the newly pulled pydarkstar folder there exists another pydarkstar direcotory that contains this file. I have tried creating and running both the .bat version as well as the .sh script versions and it always generates the same error. I have also tried using Desufire's guide on page 2 of this thread and am running into the same issue. As far as i have been able to gather the issue seems to stem from once the .bat is called the error is causing the .py file to not execute properly. I have one theory that I am going to try in the morning once my shift is over but after that if it doesn't work I am running out if ideas. :( If anyone would be so kind as to give some some insight it would be greatly appreciated. Thanks in advance! :)

Lucious_Llama
Posts: 40
Joined: Mon Jul 28, 2014 5:22 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Lucious_Llama » Thu Jul 30, 2015 7:39 am

Can you show me the bat scripts? Also, please tell me which operating system you are using.

Crosine
Posts: 49
Joined: Wed Sep 10, 2014 9:32 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Crosine » Sat Aug 01, 2015 2:07 pm

Sorry for the late reply got busy at work. Here is the scrub.bat script that I got to working. However, this does not save or update the new items.csv file in the bin folder. It saves a new items.csv file in the main pydarkstar folder but it does work for scrubbing the information and takes like an hour.

@ECHO OFF
cd "C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar"
set PYTHONPATH=%PYTHONPATH%;"C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar\bin"
python "C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar\apps\scrub.py" %*

Now when using this same process for the broker.py the broker starts, and begins going through the cmd lines until it hits the section where it says "starting main loop...." and hangs there. (I left it overnight thinking it just needed more than 15 minutes to be safe and after 9 hours it still was on "starting main loop......". Also broker.py is not reading any of the yaml settings located inside the bin folder, the only way I was able to get any of them to take affect was to edit the actual broker.py file settings itself to force it to read the correct values. not sure at this point what I am doing wrong but am getting ready to scrap this and move on to a different AH program. Here is the .bat for the broker.py step:

@ECHO OFF
cd "C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar"
set PYTHONPATH=%PYTHONPATH%;"C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar\bin"
python "C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar\apps\broker.py" "C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar\bin\items.csv" %*

***The quotations have to be inside the string to read the file path as it contains spaces***
***Also the cd must be in place or else I get a cannot find module pydarkstar.logutils***

Lucious_Llama
Posts: 40
Joined: Mon Jul 28, 2014 5:22 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Lucious_Llama » Sat Aug 01, 2015 2:32 pm

Hi. The paths are off slightly; I think the following will work:

Code: Select all

@ECHO OFF
cd "C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar\bin"
set PYTHONPATH=%PYTHONPATH%;"C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar"
python ".\scrub.py" %*

Code: Select all

@ECHO OFF
cd "C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar\bin"
set PYTHONPATH=%PYTHONPATH%;"C:\Users\FFXI Server\Desktop\Server Tools\Auction House\pydarkstar"
python ".\broker.py" ".\items.csv" %*
If you want to know why:

You were executing the scripts in the ...\Auction House\pydarkstar folder, and so, the output file (items.csv) from scrub script ended up in that folder.
Likewise, the yaml file was in the ...\Auction House\pydarkstar\bin folder, and so, could not be found by the broker script.
Running the makebin.py script was supposed to set the correct paths for you.

As far as the broker script "hanging there" and saying "starting main loop..." - that means it is working.
It is running continuously just like the game/login/search servers of the darkstar project do.
If you were to log into your server, the broker would buy items from players, and restock items for resale.
If you want it to print more output, you can enable the verbose option.

Crosine
Posts: 49
Joined: Wed Sep 10, 2014 9:32 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Crosine » Sat Aug 01, 2015 3:00 pm

Thanks for the reply Llama I will give these a shot and see if they will do the trick. Will post back soon if I run into any more issues. ;)

Crosine
Posts: 49
Joined: Wed Sep 10, 2014 9:32 pm

Re: Python AH Buyer / Seller / ffxiah.com scrubber

Post by Crosine » Sat Aug 01, 2015 3:25 pm

Ok so running the scrub.bat right now with the files you gave me. One thing I did have to do though is create a copy of the pydarkstar folder located in the pydarkstar clone directory and paste it into the bin folder. Reason being was because once we changed the directory at the beginning of the script to point at the .\bin file path, it no longer is able to detect the pydarkstar.logutils located in the files of the main directory of the pydarkstar clone folder. So far seems to be functioning properly. Will post back after the scrub is done and the broker is running. One question though before I move to that step. Does my server have to be already running in order to use the broker or can it be done without the servers started? I know its a dumb question but just want to cover my bases. Thanks Llama. :)

Post Reply