Comments (11)
What commit/branch of sc2reader are you on?
My current rewrite branch parses this replay just fine. The interface has changed in this branch but not in too many places and where its changed, its generally an improvement. You could give that a try.
If you don't want to jump around too much, you can try and apply this patch which fixes a rather embarrassing bug in the configuration.
I apologize for the lack of organization and documentation around what is going on with the library. My contributions are mostly sporadic at this point and unless someone wants to help out with the organization I'm not sure it'll improve much in the short-mid term.
Let me know if you have any problems getting the replay parsing.
from sc2reader.
I'm sorry for being a newbie from the start :)
I have installed using easy_install sc2reader and now I can't find the config.py file to apply the patch. I also tried easy_install -U sc2reader (i don't have experience with easy_install so I might be wrong).
From what i have searched installation directory is: /usr/local/lib/python2.7/dist-packages/sc2reader-0.2.0-py2.7.egg and in sc2reader I have:
$ ls sc2reader/
data.py eventparsers.py exceptions.py init.py objects.py parsers.py replay.py utils.py
data.pyc eventparsers.pyc exceptions.pyc init.pyc objects.pyc parsers.pyc replay.pyc utils.pyc
Is there anyway of installing your latest version using easy_install or should I remove current version and just download and install the "advanced method from readme" ?
Thank you
from sc2reader.
Hello,
I have the same issue, I have also installed your latests branch with python setup.py install and my current error message is:
Traceback (most recent call last):
File "/usr/local/bin/sc2printer", line 5, in
pkg_resources.run_script('sc2reader==0.2.0', 'sc2printer')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/sc2reader-0.2.0-py2.7.egg/EGG-INFO/scripts/sc2printer", line 6, in
from sc2reader import Replay
ImportError: cannot import name Replay
from sc2reader.
Hi djhold,
The issue you have is different. In your case, the issue is that the sc2printer example script hasn't been updated along with the rest of the code (and the interface has changed significantly over time). I'll get an update on the script ready soon. In the meantime, try something like this:
import sc2reader
replay = sc2reader.read_file('path/to/file.SC2Replay')
dir(replay) #to start exploring
I apologize for the lack of documentation in advance, I'm a bit short on cycles for this project. If you are interested in helping out in that regard let me know and we can work things out.
from sc2reader.
never2far,
Sorry for the delayed response, you should definitely use the advanced method for install since PyPi hasn't been updated in some time and I don't have the time to clean up for a release in the near future.
If you are familiar with Git, you should clone the repo, checkout the rewrite
branch (it will eventually be the main release branch), and do the setup.py install from there.
If you are not familiar with Git, it'll probably be easier to click the big download button on the project rewrite branch page, download the archive of your choice, extract and run setup.py install from there.
Let me know if you have problems.
from sc2reader.
Hello,
I have done python setup.py install and then tried to run sc2printer 149414-nSkENNY-VS-aflubin.sc2replay but here is error:
Traceback (most recent call last):
File "/usr/local/bin/sc2printer", line 5, in
pkg_resources.run_script('sc2reader==0.2.0', 'sc2printer')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/sc2reader-0.2.0-py2.7.egg/EGG-INFO/scripts/sc2printer", line 6, in
from sc2reader import Replay
ImportError: cannot import name Replay
I have read your answer to djhojd and using python console and then import sc2reader and your info the script works find ...but not using sc2printer.
I'll try to debug and hope it will work also sc2printer ...if you have any tips I'd be glad :)
Thank you for your help.
from sc2reader.
So I took my lunch break today and pulled some code contributed by Mike Anderson up to speed and replaced sc2printer. The updates have been pushed to the rewrite branch (just pull the new stuff down or download a new copy). Example output:
graylin@graylin-laptop:/home/sc2reader$ ./scripts/sc2printer test_replays/1.3.3.18574/
--------------------------------------
test_replays/1.3.3.18574/Slag Pits.SC2Replay
Map: Slag Pits
Date: 2011-05-15 22:07:43
Teams: ZvZ
Team 1 ShadesofGray (Z)
Team 2 TameZergling (Z)
Version: 1.3.3.18574
--------------------------------------
test_replays/1.3.3.18574/Tempest.SC2Replay
Map: Tempest
Date: 2011-05-16 00:32:37
Teams: ZTvPT
Team 1 ShadesofGray (Z)
Remedy (T)
Team 2 kungfuSAGA (P)
Konstantino (T)
Version: 1.3.3.18574
--------------------------------------
test_replays/1.3.3.18574/Metalopolis (11).SC2Replay
Map: Metalopolis
Date: 2011-05-15 21:10:49
Teams: ZvP
Team 1 ShadesofGray (Z)
Team 2 TronStar (P)
Version: 1.3.3.18574
The new version also takes options which you can get with the -h option:
graylin@graylin-laptop:/home/sc2reader$ ./scripts/sc2printer -h
usage: sc2printer [-h] [--date] [--length] [--map] [--messages] [--teams]
[--version] [--recursive]
filename [filename ...]
Prints basic information from SC2 replay files or directories.
positional arguments:
filename Paths to one or more SC2Replay files or directories
optional arguments:
-h, --help show this help message and exit
--date Print game date
--length Print game duration mm:ss in game time (not real time)
--map Print map name
--messages Print in-game player chat messages
--teams Print teams, their players, and the race matchup
--version Print the release string as seen in game
--recursive Recursively read through directories of replays
Hopefully this will help you and others get started. If you (or anyone) wants some more personal support, I may be available in #sc2reader on FreeNode from ~10-6 GMT -4:00 on weekdays or you can use the mailing list.
from sc2reader.
Hi all,
Thanks for your help. With the new changes everything is working perfectly.
Unfortunately I would love to help but I'm only a player of this game :) not a python coder.
Keep up the good work
Cheers
Claudiu
from sc2reader.
Awesome it's working now ...thank you for your support.
Too bad I can't help you because I don't know python :(
from sc2reader.
You are welcome both of you.
If you don't mind, I'm curious as to what you are using sc2reader for. Or atleast what you were hoping you might be able to do (either with it or another tool). Care to share?
from sc2reader.
Hello,
Sure ...I wanted to see if I'm able to find character code of a player using just the replay ..and it seems that it's impossible...some people on Internet said it's possible...just wanted to be sure it's not.
from sc2reader.
Related Issues (20)
- Merging the different repositories HOT 3
- Build Order Update HOT 3
- "Rejoin" events not used for players list on resumed replays. HOT 2
- Store extension mods on the replay HOT 4
- Encoding Error for certain replays HOT 5
- "TypeError: ord() expected a character, but string of length 0 found" in decoders.py v0.6.5 HOT 3
- UnicodeDecodeError for LotV beta replay HOT 30
- `None` in game events
- Would sc2reader adapt for Heroes? HOT 2
- "2207 bytes left!" on newer replays. HOT 10
- How to build the ability csv file? HOT 5
- New s2protocol HOT 4
- Replay object has no expansion HOT 2
- PLEASE USE ggtracker/sc2reader INSTEAD
- Old replay files HOT 2
- sc2reader broken for new replays HOT 1
- Lazy parsing of SC2Replay file to speed up data science HOT 1
- Export replay as .avi? HOT 4
- struct.error: unpack requires a buffer of 4 bytes
- Meaning of decoded data attributes HOT 1
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 sc2reader.