Open stringiu opened 4 years ago
Hi Giuseppe,
I think this was caused by a bug where the scripts did not work on Windows because they used native Unix-style file paths. I just fixed it, so they should work on Windows now. Also, make sure you enter the campaign, campaign code, scenario, and scenario code on the Scenarios sheet. This information is used to generate the name of the directory where the scenario files will be created, and the scripts will not work without it. For instance:
Decks/Arkham Horror - The Card Game/05 - The Circle Undone/03 - The Secret Name/
See this example https://docs.google.com/spreadsheets/d/1_C7JlHnAK3UhR6UDpY1WbSjmLOCU8dd5f_YoP5ui-lU/edit?usp=sharing .
-Dan
On Wed, Nov 6, 2019 at 12:27 PM stringiu notifications@github.com wrote:
Hi, I successfully created the sheet of a scenario, but when I tried to use the create_octgn_package, I got the following error:
created set XML file GameDatabase/a6d114c7-2e2a-4896-ad8c-0330605c90bf/Sets/a22613f0-4e9a-43a6-9c1e-0a46a9006bbf/set.xml. Traceback (most recent call last): File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 786, in _get_writer write = file_or_filename.write AttributeError: 'str' object has no attribute 'write'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File ".\create_octgn_package.py", line 39, in main() File ".\create_octgn_package.py", line 36, in main create_octgn_package(url) File ".\create_octgn_package.py", line 14, in create_octgn_package set_path, scenario_file_path = create_octgn_data(arkhamset) File "D:\Downloads\pack\octgn_package.py", line 460, in create_octgn_data scenario_xml_tree.write(scenario_file_path, encoding='UTF-8', xml_declaration=True) File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 756, in write with _get_writer(file_or_filename, enc_lower) as write: File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\contextlib.py", line 113, in enter return next(self.gen) File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 792, in _get_writer file = open(file_or_filename, "w", encoding=encoding, FileNotFoundError: [Errno 2] No such file or directory: 'Decks/Arkham Horror - The Card Game// - / - .o8d'
I am not an expert but it seems that there are some lack of permission to write some file. Can someone help me?
Giuseppe
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nichols/arkhamlcg-octgn-packager/issues/1?email_source=notifications&email_token=ABGF4OQ2XSPUBG7ZPACNUCTQSMSD7A5CNFSM4JJ4QF22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXK7GRA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGF4OVZ5GTF7KIHX5F7SRDQSMSD7ANCNFSM4JJ4QF2Q .
Thank you, now it works!
I really appreciate your script
Hi, I successfully created the sheet of a scenario, but when I tried to use the create_octgn_package, I got the following error:
created set XML file GameDatabase/a6d114c7-2e2a-4896-ad8c-0330605c90bf/Sets/a22613f0-4e9a-43a6-9c1e-0a46a9006bbf/set.xml. Traceback (most recent call last): File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 786, in _get_writer write = file_or_filename.write AttributeError: 'str' object has no attribute 'write'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File ".\create_octgn_package.py", line 39, in
main()
File ".\create_octgn_package.py", line 36, in main
create_octgn_package(url)
File ".\create_octgn_package.py", line 14, in create_octgn_package
set_path, scenario_file_path = create_octgn_data(arkhamset)
File "D:\Downloads\pack\octgn_package.py", line 460, in create_octgn_data
scenario_xml_tree.write(scenario_file_path, encoding='UTF-8', xml_declaration=True)
File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 756, in write
with _get_writer(file_or_filename, enc_lower) as write:
File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\contextlib.py", line 113, in enter
return next(self.gen)
File "C:\Users\Giuseppe\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 792, in _get_writer
file = open(file_or_filename, "w", encoding=encoding,
FileNotFoundError: [Errno 2] No such file or directory: 'Decks/Arkham Horror - The Card Game// - / - .o8d'
I am not an expert but it seems that there are some lack of permission to write some file. Can someone help me?
Giuseppe