Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to put files #724

Closed
jitterdev opened this issue May 4, 2020 · 5 comments
Closed

Where to put files #724

jitterdev opened this issue May 4, 2020 · 5 comments

Comments

@jitterdev
Copy link

I'm trying to figure out where to put my files I want to be transpiled. The documentation is completely useless in my case, as it doesn't specify for what I need. Where is the directory/Where should I make the directory for the files I want to transpile?

@jitterdev
Copy link
Author

jitterdev commented May 4, 2020

Don't know if this is related, but heres the error when I try to run experiment1.py (I don't even know where the file is supposed to go)

Microsoft Windows [Version 10.0.18362.778]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\xdc20>transcrypt -b experiment1

Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.7.16
Copyright (C) Geatec Engineering. License: Apache 2.0


Saving target code in: C:/Users/xdc20/__target__/org.transcrypt.__runtime__.js
Saving minified target code in: C:/Users/xdc20/__target__/org.transcrypt.__runtime__.js

list index out of rangeTraceback (most recent call last):
  File "c:/python38/lib/site-packages/transcrypt/modules\org\transcrypt\compiler.py", line 98, in __init__
    self.provide (self.mainModuleName, '__main__')
  File "c:/python38/lib/site-packages/transcrypt/modules\org\transcrypt\compiler.py", line 120, in provide
    return Module (self, moduleName, __moduleName__, filter)
  File "c:/python38/lib/site-packages/transcrypt/modules\org\transcrypt\compiler.py", line 129, in __init__
    self.findPaths (filter)
  File "c:/python38/lib/site-packages/transcrypt/modules\org\transcrypt\compiler.py", line 313, in findPaths
    raise utils.Error (
org.transcrypt.utils.Error: <unprintable Error object>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python38\lib\site-packages\transcrypt\__main__.py", line 171, in main
    compiler.Program (transpilationDirs, __symbols__, __envir__)
  File "c:/python38/lib/site-packages/transcrypt/modules\org\transcrypt\compiler.py", line 102, in __init__
    message = f'\n\t{exception}'
  File "c:/python38/lib/site-packages/transcrypt/modules\org\transcrypt\utils.py", line 212, in __str__
    result += '\n\tFile \'{}\', line {}, namely:'.format (str (program.importStack [-1][0] .name), self.lineNr)
IndexError: list index out of range


Aborted


C:\Users\xdc20>

@JennaSys
Copy link
Collaborator

JennaSys commented May 4, 2020

Does your experiment1.py file reside in the C:/Users/xdc20/ folder where you are running transcrypt from?

@jitterdev
Copy link
Author

jitterdev commented May 7, 2020

Sorry for the delay, I will check.

EDIT: I don't know, because I don't know the transcrypt directory.

@AlexECX
Copy link

AlexECX commented May 13, 2020

@jitterdev You don't have to put your file anywhere specific, just give the path of your experiment1.py file to transcrypt and it will start building in that same location. The path should point to a valid python module you made that you want to transpile into javascript.

If your file is C:/Users/xdc20/experiment1.py you can either do:

> cd C:/Users/xdc20/
> transcrypt -b experiment1.py

or

> transcrypt -b C:/Users/xdc20/experiment1.py

@jitterdev
Copy link
Author

Alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants